diff options
Diffstat (limited to 'rest_framework/tests')
| -rw-r--r-- | rest_framework/tests/test_throttling.py | 4 | 
1 files changed, 4 insertions, 0 deletions
diff --git a/rest_framework/tests/test_throttling.py b/rest_framework/tests/test_throttling.py index 41bff692..b5ae02cd 100644 --- a/rest_framework/tests/test_throttling.py +++ b/rest_framework/tests/test_throttling.py @@ -117,8 +117,10 @@ class ThrottlingTests(TestCase):              response = view.as_view()(request)              if expect is not None:                  self.assertEqual(response['X-Throttle-Wait-Seconds'], expect) +                self.assertEqual(response['Retry-After'], expect)              else:                  self.assertFalse('X-Throttle-Wait-Seconds' in response) +                self.assertFalse('Retry-After' in response)      def test_seconds_fields(self):          """ @@ -165,11 +167,13 @@ class ThrottlingTests(TestCase):          response = MockView_NonTimeThrottling.as_view()(request)          self.assertFalse('X-Throttle-Wait-Seconds' in response) +        self.assertFalse('Retry-After' in response)          self.assertTrue(MockView_NonTimeThrottling.throttle_classes[0].called)          response = MockView_NonTimeThrottling.as_view()(request)          self.assertFalse('X-Throttle-Wait-Seconds' in response)  +        self.assertFalse('Retry-After' in response)  class ScopedRateThrottleTests(TestCase):  | 
