

def test_longID(self):
    rid = hashlib.sha1(str(random.getrandbits(255))).digest()
    n = Node(rid)
    self.assertEqual(n.long_id, int(rid.encode('hex'), 16))

dataset/ETHPy150Open OpenBazaar/OpenBazaar-Server/dht/tests/test_node.py NodeTest.test_longID/original