Пример #1
0
 def test_get_rate_20_2d(self):
     rate = ratelimit._get_rate("20/2d")
     self.assertEqual(rate, (20, 60 * 60 * 24 * 2))
Пример #2
0
 def test_get_rate_1_5m(self):
     rate = ratelimit._get_rate("1/5m")
     self.assertEqual(rate, (1, 5 * 60))
Пример #3
0
 def test_get_rate_4_5h(self):
     rate = ratelimit._get_rate("4/5h")
     self.assertEqual(rate, (4, 5 * 60 * 60))
Пример #4
0
 def test_get_rate_1000_1s(self):
     rate = ratelimit._get_rate("1000/1s")
     self.assertEqual(rate, (1000, 1))