diff options
Diffstat (limited to 'djangorestframework/tests')
| -rw-r--r-- | djangorestframework/tests/authentication.py | 2 | ||||
| -rw-r--r-- | djangorestframework/tests/throttling.py | 8 | 
2 files changed, 5 insertions, 5 deletions
diff --git a/djangorestframework/tests/authentication.py b/djangorestframework/tests/authentication.py index 25410b04..5debc79a 100644 --- a/djangorestframework/tests/authentication.py +++ b/djangorestframework/tests/authentication.py @@ -12,7 +12,7 @@ import base64  class MockView(View): -    permissions = (permissions.IsAuthenticated,) +    permissions_classes = (permissions.IsAuthenticated,)      def post(self, request):          return HttpResponse({'a': 1, 'b': 2, 'c': 3}) diff --git a/djangorestframework/tests/throttling.py b/djangorestframework/tests/throttling.py index 393c3ec8..73a4c02b 100644 --- a/djangorestframework/tests/throttling.py +++ b/djangorestframework/tests/throttling.py @@ -13,17 +13,17 @@ from djangorestframework.resources import FormResource  from djangorestframework.response import Response  class MockView(View): -    permissions = ( PerUserThrottling, ) +    permissions_classes = ( PerUserThrottling, )      throttle = '3/sec'      def get(self, request):          return Response('foo')  class MockView_PerViewThrottling(MockView): -    permissions = ( PerViewThrottling, ) +    permissions_classes = ( PerViewThrottling, )  class MockView_PerResourceThrottling(MockView): -    permissions = ( PerResourceThrottling, ) +    permissions_classes = ( PerResourceThrottling, )      resource = FormResource  class MockView_MinuteThrottling(MockView): @@ -54,7 +54,7 @@ class ThrottlingTests(TestCase):          """          Explicitly set the timer, overriding time.time()          """ -        view.permissions[0].timer = lambda self: value +        view.permissions_classes[0].timer = lambda self: value      def test_request_throttling_expires(self):          """  | 
