diff --git a/tests/test_throttling.py b/tests/test_throttling.py index d0aa0584c..b9b877827 100644 --- a/tests/test_throttling.py +++ b/tests/test_throttling.py @@ -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):