mirror of
https://github.com/encode/django-rest-framework.git
synced 2025-07-18 04:02:35 +03:00
updating the docs and removing the extra file from package
This commit is contained in:
parent
4d54da3176
commit
a5aa48b6c4
|
@ -15,7 +15,7 @@ from rest_framework.settings import api_settings
|
|||
from rest_framework.test import APIRequestFactory, force_authenticate
|
||||
from rest_framework.throttling import (
|
||||
AnonRateThrottle, BaseThrottle, ScopedRateThrottle, SimpleRateThrottle,
|
||||
UserRateThrottle, parse_quantity_and_unit
|
||||
UserRateThrottle
|
||||
)
|
||||
from rest_framework.views import APIView
|
||||
|
||||
|
@ -467,11 +467,11 @@ class SimpleRateThrottleTests(TestCase):
|
|||
assert rate == (None, None)
|
||||
|
||||
def test_parse_quantity_and_unit_parses_correctly(self):
|
||||
result = parse_quantity_and_unit("5min")
|
||||
result = SimpleRateThrottle().parse_quantity_and_unit("5min")
|
||||
assert result == (5, 'min')
|
||||
result = parse_quantity_and_unit("h")
|
||||
result = SimpleRateThrottle().parse_quantity_and_unit("h")
|
||||
assert result == (1, 'h')
|
||||
result = parse_quantity_and_unit("123s")
|
||||
result = SimpleRateThrottle().parse_quantity_and_unit("123s")
|
||||
assert result == (123, 's')
|
||||
|
||||
def test_allow_request_returns_true_if_rate_is_none(self):
|
||||
|
|
Loading…
Reference in New Issue
Block a user