diff options
| author | Tom Christie | 2013-06-28 17:17:39 +0100 |
|---|---|---|
| committer | Tom Christie | 2013-06-28 17:17:39 +0100 |
| commit | 7224b20d58ceee22abc987980ab646ab8cb2d8dc (patch) | |
| tree | acbe0ee1eb19e22d561ca93e7fdab18f3a1e53ff /rest_framework/tests/test_throttling.py | |
| parent | 4ee9cdc7aff30fc3f45e78292da77b5989bb0e23 (diff) | |
| download | django-rest-framework-7224b20d58ceee22abc987980ab646ab8cb2d8dc.tar.bz2 | |
Added APIRequestFactory
Diffstat (limited to 'rest_framework/tests/test_throttling.py')
| -rw-r--r-- | rest_framework/tests/test_throttling.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/rest_framework/tests/test_throttling.py b/rest_framework/tests/test_throttling.py index d35d3709..19bc691a 100644 --- a/rest_framework/tests/test_throttling.py +++ b/rest_framework/tests/test_throttling.py @@ -5,7 +5,7 @@ from __future__ import unicode_literals from django.test import TestCase from django.contrib.auth.models import User from django.core.cache import cache -from django.test.client import RequestFactory +from rest_framework.test import APIRequestFactory from rest_framework.views import APIView from rest_framework.throttling import UserRateThrottle, ScopedRateThrottle from rest_framework.response import Response @@ -41,7 +41,7 @@ class ThrottlingTests(TestCase): Reset the cache so that no throttles will be active """ cache.clear() - self.factory = RequestFactory() + self.factory = APIRequestFactory() def test_requests_are_throttled(self): """ @@ -173,7 +173,7 @@ class ScopedRateThrottleTests(TestCase): return Response('y') self.throttle_class = XYScopedRateThrottle - self.factory = RequestFactory() + self.factory = APIRequestFactory() self.x_view = XView.as_view() self.y_view = YView.as_view() self.unscoped_view = UnscopedView.as_view() |
