diff options
| author | Tom Christie | 2014-11-03 14:36:06 +0000 |
|---|---|---|
| committer | Tom Christie | 2014-11-03 14:36:06 +0000 |
| commit | b106ebd2c0a19107f12d5b87cfbe0083aaaa60b9 (patch) | |
| tree | 736da30fadc813385cc2359caeb30a8ef5d422cb /tests/test_throttling.py | |
| parent | 650a91ac24cbd3e5b4ad5d7d7c6706fdf6160a78 (diff) | |
| parent | 8861a7dfc757a88335048aa7bbccfc8a77850c48 (diff) | |
| download | django-rest-framework-b106ebd2c0a19107f12d5b87cfbe0083aaaa60b9.tar.bz2 | |
Merge pull request #1800 from tomchristie/version-3.0
Version 3.0
Diffstat (limited to 'tests/test_throttling.py')
| -rw-r--r-- | tests/test_throttling.py | 6 |
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) |
