updating the docs and removing the extra file from package

This commit is contained in:
Pravin Kamble 2023-08-22 23:57:48 +05:30
parent 4d54da3176
commit a5aa48b6c4

View File

@ -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):