Esempio n. 1
0
 def test_distance(self):
     """
     Sanity check to ensure the XOR'd values return the correct distance.
     """
     parent_node_id = 'abc'
     r = RoutingTable(parent_node_id)
     key1 = 'abc'
     key2 = 'xyz'
     expected = 1645337L
     actual = r.distance(key1, key2)
     self.assertEqual(expected, actual)