

def test_remove(self):
    heap = NodeHeap(mknode(intid=0), 5)
    nodes = [mknode(intid=x) for x in range(10)]
    for node in nodes:
        heap.push(node)
    heap.remove([nodes[0].id, nodes[1].id])
    self.assertEqual(len(list(heap)), 5)
    for (index, node) in enumerate(heap):
        self.assertEqual((index + 2), node.long_id)
        self.assertTrue((index < 5))

dataset/ETHPy150Open OpenBazaar/OpenBazaar-Server/dht/tests/test_node.py NodeHeapTest.test_remove/original