def test_random_key_in_bucket_range(self):
        parent_node_id = '0xdeadbeef'
        r = RoutingTable(parent_node_id)
        bucket = Bucket(1, 2)
        r._buckets[0] = bucket
        expected = 1
        actual = int(r._random_key_in_bucket_range(0), 0)
        self.assertEqual(expected, actual)
Ensures the returned key is within the expected bucket range.
dataset/ETHPy150Open ntoll/p4p2p/test/dht/test_routingtable.py/TestRoutingTable.test_random_key_in_bucket_range