diff options
Diffstat (limited to 'djangorestframework/tests')
| -rw-r--r-- | djangorestframework/tests/accept.py | 2 | ||||
| -rw-r--r-- | djangorestframework/tests/authentication.py | 2 | ||||
| -rw-r--r-- | djangorestframework/tests/files.py | 7 | ||||
| -rw-r--r-- | djangorestframework/tests/reverse.py | 2 |
4 files changed, 6 insertions, 7 deletions
diff --git a/djangorestframework/tests/accept.py b/djangorestframework/tests/accept.py index f2a21277..726e1252 100644 --- a/djangorestframework/tests/accept.py +++ b/djangorestframework/tests/accept.py @@ -20,7 +20,7 @@ class UserAgentMungingTest(TestCase): def setUp(self): class MockResource(Resource): anon_allowed_methods = allowed_methods = ('GET',) - def get(self, request, auth): + def get(self, request): return {'a':1, 'b':2, 'c':3} self.req = RequestFactory() self.MockResource = MockResource diff --git a/djangorestframework/tests/authentication.py b/djangorestframework/tests/authentication.py index af9c34ca..b2bc4446 100644 --- a/djangorestframework/tests/authentication.py +++ b/djangorestframework/tests/authentication.py @@ -15,7 +15,7 @@ except ImportError: class MockResource(Resource): allowed_methods = ('POST',) - def post(self, request, auth, content): + def post(self, request): return {'a':1, 'b':2, 'c':3} urlpatterns = patterns('', diff --git a/djangorestframework/tests/files.py b/djangorestframework/tests/files.py index e155f181..dd4689a6 100644 --- a/djangorestframework/tests/files.py +++ b/djangorestframework/tests/files.py @@ -19,10 +19,9 @@ class UploadFilesTests(TestCase): allowed_methods = anon_allowed_methods = ('POST',) form = FileForm - def post(self, request, auth, content, *args, **kwargs): - #self.uploaded = content.file - return {'FILE_NAME': content['file'].name, - 'FILE_CONTENT': content['file'].read()} + def post(self, request, *args, **kwargs): + return {'FILE_NAME': self.CONTENT['file'].name, + 'FILE_CONTENT': self.CONTENT['file'].read()} file = StringIO.StringIO('stuff') file.name = 'stuff.txt' diff --git a/djangorestframework/tests/reverse.py b/djangorestframework/tests/reverse.py index a862e39a..f6a3ea51 100644 --- a/djangorestframework/tests/reverse.py +++ b/djangorestframework/tests/reverse.py @@ -14,7 +14,7 @@ class MockResource(Resource): """Mock resource which simply returns a URL, so that we can ensure that reversed URLs are fully qualified""" anon_allowed_methods = ('GET',) - def get(self, request, auth): + def get(self, request): return reverse('another') urlpatterns = patterns('', |
