aboutsummaryrefslogtreecommitdiffstats
path: root/djangorestframework/tests/throttling.py
diff options
context:
space:
mode:
authorTom Christie2012-08-26 23:06:52 +0100
committerTom Christie2012-08-26 23:06:52 +0100
commit73cc77553ed5411f1959a51574b156a47ad5340d (patch)
tree0b3a0f707fefd116a274adcfa80364596e8df76d /djangorestframework/tests/throttling.py
parentedd8f5963cb32063931a1557d3c6ac29d19b3425 (diff)
downloaddjango-rest-framework-73cc77553ed5411f1959a51574b156a47ad5340d.tar.bz2
Drop ImmediateResponse
Diffstat (limited to 'djangorestframework/tests/throttling.py')
-rw-r--r--djangorestframework/tests/throttling.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/djangorestframework/tests/throttling.py b/djangorestframework/tests/throttling.py
index d307cd32..ad22d2d2 100644
--- a/djangorestframework/tests/throttling.py
+++ b/djangorestframework/tests/throttling.py
@@ -45,7 +45,7 @@ class ThrottlingTests(TestCase):
request = self.factory.get('/')
for dummy in range(4):
response = MockView.as_view()(request)
- self.assertEqual(503, response.status_code)
+ self.assertEqual(429, response.status_code)
def set_throttle_timer(self, view, value):
"""
@@ -62,7 +62,7 @@ class ThrottlingTests(TestCase):
request = self.factory.get('/')
for dummy in range(4):
response = MockView.as_view()(request)
- self.assertEqual(503, response.status_code)
+ self.assertEqual(429, response.status_code)
# Advance the timer by one second
self.set_throttle_timer(MockView, 1)
@@ -90,7 +90,7 @@ class ThrottlingTests(TestCase):
"""
Ensure request rate is limited globally per View for PerViewThrottles
"""
- self.ensure_is_throttled(MockView_PerViewThrottling, 503)
+ self.ensure_is_throttled(MockView_PerViewThrottling, 429)
def ensure_response_header_contains_proper_throttle_field(self, view, expected_headers):
"""