Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(4)  |  Call(4)  |  Derive(0)  |  Import(0)

src/d/h/DHTBot-HEAD/dhtbot/test/test_contact.py   DHTBot(Download)
        self.assertFalse(n.fresh())
        # Refresh the node with a new query
        n.successful_query(10)
        self.assertTrue(n.fresh())
 
        n_fresh = contact.Node(2**2, ("127.0.0.1", 2222))
        self.testclock.set(constants.node_timeout + 1)
        n_fresh.successful_query(10)
        self.assertTrue(n_fresh.better_than(n_old))
 
        n_fast = contact.Node(2**2, ("127.0.0.1", 2222))
        self.testclock.set(10)
        n_slow.successful_query(0)
        n_fast.successful_query(5)
        self.assertTrue(n_fast.better_than(n_slow))