diff options
Diffstat (limited to 'djangorestframework/tests')
| -rw-r--r-- | djangorestframework/tests/response.py | 2 | ||||
| -rw-r--r-- | djangorestframework/tests/throttling.py | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/djangorestframework/tests/response.py b/djangorestframework/tests/response.py index 07d0f4fb..ded0a3da 100644 --- a/djangorestframework/tests/response.py +++ b/djangorestframework/tests/response.py @@ -4,7 +4,7 @@ import unittest from django.conf.urls.defaults import patterns, url, include from django.test import TestCase -from djangorestframework.response import Response, NotAcceptable, ImmediateResponse +from djangorestframework.response import Response, NotAcceptable from djangorestframework.views import View from djangorestframework.compat import RequestFactory from djangorestframework import status 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): """ |
