aboutsummaryrefslogtreecommitdiffstats
path: root/tests/test_throttling.py
diff options
context:
space:
mode:
authorCarlton Gibson2014-11-18 16:42:39 +0100
committerCarlton Gibson2014-11-18 16:42:39 +0100
commitc50a42bddc66e28d624cd3caadd2d63502ac2e6e (patch)
treebf03e2dcb23c2e4f372ff00cba4a810a96c24681 /tests/test_throttling.py
parentba52c0c62762b9976fffa72dde7ce922176e481d (diff)
parent080bd3d24e1866df2acc3aae0ec0f97ebe3a8c36 (diff)
downloaddjango-rest-framework-c50a42bddc66e28d624cd3caadd2d63502ac2e6e.tar.bz2
Merge branch 'master' of github.com:tomchristie/django-rest-framework
Diffstat (limited to 'tests/test_throttling.py')
-rw-r--r--tests/test_throttling.py6
1 files changed, 1 insertions, 5 deletions
diff --git a/tests/test_throttling.py b/tests/test_throttling.py
index 7b696f07..cc36a004 100644
--- a/tests/test_throttling.py
+++ b/tests/test_throttling.py
@@ -109,7 +109,7 @@ class ThrottlingTests(TestCase):
def ensure_response_header_contains_proper_throttle_field(self, view, expected_headers):
"""
- Ensure the response returns an X-Throttle field with status and next attributes
+ Ensure the response returns an Retry-After field with status and next attributes
set properly.
"""
request = self.factory.get('/')
@@ -117,10 +117,8 @@ class ThrottlingTests(TestCase):
self.set_throttle_timer(view, timer)
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):
@@ -173,13 +171,11 @@ class ThrottlingTests(TestCase):
self.assertFalse(hasattr(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)
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)