def test_get_rate_20_2d(self): rate = ratelimit._get_rate("20/2d") self.assertEqual(rate, (20, 60 * 60 * 24 * 2))
def test_get_rate_1_5m(self): rate = ratelimit._get_rate("1/5m") self.assertEqual(rate, (1, 5 * 60))
def test_get_rate_4_5h(self): rate = ratelimit._get_rate("4/5h") self.assertEqual(rate, (4, 5 * 60 * 60))
def test_get_rate_1000_1s(self): rate = ratelimit._get_rate("1000/1s") self.assertEqual(rate, (1000, 1))