mirror of
https://github.com/encode/django-rest-framework.git
synced 2025-07-18 04:02:35 +03:00
fixing the whitespaces
This commit is contained in:
parent
decd4b83e1
commit
c10c92c59b
|
@ -102,7 +102,6 @@ class SimpleRateThrottle(BaseThrottle):
|
|||
"""
|
||||
if rate is None:
|
||||
return (None, None)
|
||||
|
||||
num, period = rate.split('/')
|
||||
quantity, unit = parse_quantity_and_unit(period).values()
|
||||
num_requests = int(num)
|
||||
|
|
|
@ -470,10 +470,8 @@ class SimpleRateThrottleTests(TestCase):
|
|||
def test_parse_quantity_and_unit_parses_correctly(self):
|
||||
result = parse_quantity_and_unit("5min")
|
||||
assert result == {'quantity': 5, 'unit': 'min'}
|
||||
|
||||
result = parse_quantity_and_unit("h")
|
||||
assert result == {'quantity': 1, 'unit': 'h'}
|
||||
|
||||
result = parse_quantity_and_unit("123s")
|
||||
assert result == {'quantity': 123, 'unit': 's'}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user