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

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

src/d/h/DHTBot-HEAD/dhtbot/test/extensions/test_rate_limiter.py   DHTBot(Download)
    def test_consume_verifyTokenDecrease(self):
        tb = TokenBucket(10, 1)
        self.assertTrue(tb.consume(10))
        self.assertEquals(0, tb.tokens)
 
    def test_consume_notEnoughTokens(self):
        tb = TokenBucket(10, 1)
        self.assertFalse(tb.consume(100))