def test_nodes_address(self): manager = LocalhostNodesManager(1, 2) self.assertEqual(manager.get_next_node_address()[0], 'localhost') self.assertNotEqual(manager.get_self_address()[1], manager.get_next_node_address()[1])
def test_self_address(self): manager = LocalhostNodesManager(1, 2) self.assertEqual(manager.get_self_address()[0], 'localhost') self.assertGreaterEqual(manager.get_self_address()[1], 1024)