diff options
| author | Tom Christie | 2012-08-24 22:11:00 +0100 |
|---|---|---|
| committer | Tom Christie | 2012-08-24 22:11:00 +0100 |
| commit | aed26b218ea39110489e85abc6f412399a1774a1 (patch) | |
| tree | 0b461ba4f7f5266056b6463e9b80214e5e273502 /djangorestframework/tests/throttling.py | |
| parent | 87b363f7bc5f73d850df123a61895d65ec0b05e7 (diff) | |
| download | django-rest-framework-aed26b218ea39110489e85abc6f412399a1774a1.tar.bz2 | |
Drop out resources & mixins
Diffstat (limited to 'djangorestframework/tests/throttling.py')
| -rw-r--r-- | djangorestframework/tests/throttling.py | 14 |
1 files changed, 1 insertions, 13 deletions
diff --git a/djangorestframework/tests/throttling.py b/djangorestframework/tests/throttling.py index 8c5457d3..d307cd32 100644 --- a/djangorestframework/tests/throttling.py +++ b/djangorestframework/tests/throttling.py @@ -8,8 +8,7 @@ from django.core.cache import cache from djangorestframework.compat import RequestFactory from djangorestframework.views import View -from djangorestframework.permissions import PerUserThrottling, PerViewThrottling, PerResourceThrottling -from djangorestframework.resources import FormResource +from djangorestframework.permissions import PerUserThrottling, PerViewThrottling from djangorestframework.response import Response @@ -25,11 +24,6 @@ class MockView_PerViewThrottling(MockView): permission_classes = (PerViewThrottling,) -class MockView_PerResourceThrottling(MockView): - permission_classes = (PerResourceThrottling,) - resource = FormResource - - class MockView_MinuteThrottling(MockView): throttle = '3/min' @@ -98,12 +92,6 @@ class ThrottlingTests(TestCase): """ self.ensure_is_throttled(MockView_PerViewThrottling, 503) - def test_request_throttling_is_per_resource(self): - """ - Ensure request rate is limited globally per Resource for PerResourceThrottles - """ - self.ensure_is_throttled(MockView_PerResourceThrottling, 503) - 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 |
