From d373b3a067796b8e181be9368fa24e89c572c45e Mon Sep 17 00:00:00 2001 From: Tom Christie Date: Wed, 4 May 2011 09:21:17 +0100 Subject: Decouple views and resources --- djangorestframework/tests/throttling.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'djangorestframework/tests/throttling.py') diff --git a/djangorestframework/tests/throttling.py b/djangorestframework/tests/throttling.py index 46383271..94d01428 100644 --- a/djangorestframework/tests/throttling.py +++ b/djangorestframework/tests/throttling.py @@ -3,11 +3,11 @@ from django.test import TestCase from django.utils import simplejson as json from djangorestframework.compat import RequestFactory -from djangorestframework.resource import Resource +from djangorestframework.views import BaseView from djangorestframework.permissions import Throttling -class MockResource(Resource): +class MockView(BaseView): permissions = ( Throttling, ) throttle = (3, 1) # 3 requests per second @@ -15,7 +15,7 @@ class MockResource(Resource): return 'foo' urlpatterns = patterns('', - (r'^$', MockResource.as_view()), + (r'^$', MockView.as_view()), ) -- cgit v1.2.3