def testConnection(self):
        gevent.monkey.patch_all()
        from network import NetworkListener

        net = NetworkListener(None, port = 8345)
        netlist = [net]
        for i in range(100):
            new = NetworkListener(net.node.addr, port = 8346+i)
            netlist.append(new)

        while 2 < len(net.finger.known):
            gevent.sleep()

        net.set_handler.set('hi','bar')
        net.set_handler.set('lp_blah', ['hi'])
        net.set_handler.add('lp_blah', 'bar')

        with gevent.Timeout(3):
            while sum(map(lambda x: len(x.set_handler.dict), netlist)) < 2:
                gevent.sleep()
        self.assertEqual(net.set_handler.get('hi'), 'bar')
        self.assertEqual(net.set_handler.get('lp_blah'), ['hi','bar'])
dataset/ETHPy150Open c00w/gevent-dht/gevent_dht/set_store.py/TestStore.testConnection/swapped operands of `<`