Example #1
0
 def testSetAndRemoveDevice(self):
     persistence = Config(self.tempdir)
     persistence.set_device(DEVICE, DEVICE_ATTRIBUTES)
     self.assertEqual(persistence.devices[DEVICE], DEVICE_ATTRIBUTES)
     persistence.remove_device(DEVICE)
     self.assertTrue(persistence.devices.get(DEVICE) is None)
Example #2
0
 def testSetAndRemoveDevice(self):
     persistence = Config(self.tempdir)
     persistence.set_device(DEVICE, DEVICE_ATTRIBUTES)
     self.assertEqual(persistence.devices[DEVICE], DEVICE_ATTRIBUTES)
     persistence.remove_device(DEVICE)
     self.assertTrue(persistence.devices.get(DEVICE) is None)
Example #3
0
 def testSetAndRemoveDevice(self, netconf_dir):
     persistence = Config(netconf_dir)
     persistence.set_device(DEVICE, DEVICE_ATTRIBUTES)
     assert persistence.devices[DEVICE] == DEVICE_ATTRIBUTES
     persistence.remove_device(DEVICE)
     assert persistence.devices.get(DEVICE) is None