From a5aa48b6c43b4567e0bbe23372bda8c75ed83e69 Mon Sep 17 00:00:00 2001 From: Pravin Kamble Date: Tue, 22 Aug 2023 23:57:48 +0530 Subject: [PATCH] updating the docs and removing the extra file from package --- tests/test_throttling.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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):