From 4692374e0d6f020f8a7a95f3a60094d525c59341 Mon Sep 17 00:00:00 2001 From: Tom Christie Date: Mon, 25 Apr 2011 01:03:23 +0100 Subject: Generic permissions added, allowed_methods and anon_allowed_methods now defunct, dispatch now mirrors View.dispatch more nicely --- djangorestframework/tests/accept.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'djangorestframework/tests/accept.py') diff --git a/djangorestframework/tests/accept.py b/djangorestframework/tests/accept.py index 726e1252..b12dc757 100644 --- a/djangorestframework/tests/accept.py +++ b/djangorestframework/tests/accept.py @@ -18,10 +18,13 @@ class UserAgentMungingTest(TestCase): http://www.gethifi.com/blog/browser-rest-http-accept-headers""" def setUp(self): + class MockResource(Resource): - anon_allowed_methods = allowed_methods = ('GET',) + permissions = () + def get(self, request): return {'a':1, 'b':2, 'c':3} + self.req = RequestFactory() self.MockResource = MockResource self.view = MockResource.as_view() -- cgit v1.2.3