Beispiel #1
0
 def testUUID(self):
     """ As for Address but UUID """
     node = Node(self.manager)
     self.assertEqual(node.getAddress(), None)
     uuid = self.getNewUUID(None)
     node.setUUID(uuid)
     self._updatedByUUID(node)
Beispiel #2
0
 def testAddress(self):
     """ Check if the node is indexed by address """
     node = Node(self.manager)
     self.assertEqual(node.getAddress(), None)
     address = ('127.0.0.1', 10000)
     node.setAddress(address)
     self._updatedByAddress(node)
Beispiel #3
0
 def testUUID(self):
     """ As for Address but UUID """
     node = Node(self.manager)
     self.assertEqual(node.getAddress(), None)
     uuid = self.getNewUUID(None)
     node.setUUID(uuid)
     self._updatedByUUID(node)
Beispiel #4
0
 def testAddress(self):
     """ Check if the node is indexed by address """
     node = Node(self.manager)
     self.assertEqual(node.getAddress(), None)
     address = ('127.0.0.1', 10000)
     node.setAddress(address)
     self._updatedByAddress(node)
Beispiel #5
0
 def testInit(self):
     """ Check the node initialization """
     address = ('127.0.0.1', 10000)
     uuid = self.getNewUUID(None)
     node = Node(self.manager, address=address, uuid=uuid)
     self.assertEqual(node.getState(), NodeStates.UNKNOWN)
     self.assertEqual(node.getAddress(), address)
     self.assertEqual(node.getUUID(), uuid)
     self.assertTrue(time() - 1 < node.getLastStateChange() < time())
Beispiel #6
0
 def testInit(self):
     """ Check the node initialization """
     address = ('127.0.0.1', 10000)
     uuid = self.getNewUUID(None)
     node = Node(self.nm, address=address, uuid=uuid)
     self.assertEqual(node.getState(), NodeStates.DOWN)
     self.assertEqual(node.getAddress(), address)
     self.assertEqual(node.getUUID(), uuid)
     self.assertTrue(time() - 1 < node.getLastStateChange() < time())