|
5 | 5 | from pymodbus.constants import DeviceInformation |
6 | 6 | from pymodbus.device import ( |
7 | 7 | DeviceInformationFactory, |
8 | | - ModbusAccessControl, |
9 | 8 | ModbusControlBlock, |
10 | 9 | ModbusDeviceIdentification, |
11 | 10 | ModbusPlusStatistics, |
@@ -43,14 +42,12 @@ def setUp(self): |
43 | 42 | } |
44 | 43 | self.ident = ModbusDeviceIdentification(self.info) |
45 | 44 | self.control = ModbusControlBlock() |
46 | | - self.access = ModbusAccessControl() |
47 | 45 | self.control.reset() |
48 | 46 |
|
49 | 47 | def tearDown(self): |
50 | 48 | """Clean up the test environment""" |
51 | 49 | del self.ident |
52 | 50 | del self.control |
53 | | - del self.access |
54 | 51 |
|
55 | 52 | def test_update_identity(self): |
56 | 53 | """Test device identification reading""" |
@@ -272,32 +269,6 @@ def test_modbus_control_block_invalid_diagnostic(self): |
272 | 269 | self.assertEqual(None, self.control.getDiagnostic(None)) |
273 | 270 | self.assertEqual(None, self.control.getDiagnostic([1, 2, 3])) |
274 | 271 |
|
275 | | - def test_add_remove__single_clients(self): |
276 | | - """Test adding and removing a host""" |
277 | | - self.assertFalse(self.access.check("192.168.1.1")) |
278 | | - self.access.add("192.168.1.1") |
279 | | - self.assertTrue(self.access.check("192.168.1.1")) |
280 | | - self.access.add("192.168.1.1") |
281 | | - self.access.remove("192.168.1.1") |
282 | | - self.assertFalse(self.access.check("192.168.1.1")) |
283 | | - |
284 | | - def test_add_remove_multiple_clients(self): |
285 | | - """Test adding and removing a host""" |
286 | | - clients = ["192.168.1.1", "192.168.1.2", "192.168.1.3"] |
287 | | - self.access.add(clients) |
288 | | - for host in clients: |
289 | | - self.assertTrue(self.access.check(host)) |
290 | | - self.access.remove(clients) |
291 | | - |
292 | | - def test_network_access_list_iterator(self): |
293 | | - """Test adding and removing a host""" |
294 | | - clients = ["127.0.0.1", "192.168.1.1", "192.168.1.2", "192.168.1.3"] |
295 | | - self.access.add(clients) |
296 | | - for host in self.access: |
297 | | - self.assertTrue(host in clients) |
298 | | - for host in clients: |
299 | | - self.assertTrue(host in self.access) |
300 | | - |
301 | 272 | def test_clearing_control_events(self): |
302 | 273 | """Test adding and clearing modbus events""" |
303 | 274 | self.assertEqual(self.control.Events, []) |
|
0 commit comments