aboutsummaryrefslogtreecommitdiffstats
path: root/djangorestframework/tests
diff options
context:
space:
mode:
authorTom Christie2011-04-11 17:13:11 +0100
committerTom Christie2011-04-11 17:13:11 +0100
commit18bbda84b9c663fec6eede112a21cf1a48103303 (patch)
tree841d1a167b823cbca7a5c487f6dbee4346db4b24 /djangorestframework/tests
parent6096b50dbe20349144aa92660c6c8467f67f50e7 (diff)
downloaddjango-rest-framework-18bbda84b9c663fec6eede112a21cf1a48103303.tar.bz2
depercate auth and content arguments to the request handler methods - yea :)
Diffstat (limited to 'djangorestframework/tests')
-rw-r--r--djangorestframework/tests/accept.py2
-rw-r--r--djangorestframework/tests/authentication.py2
-rw-r--r--djangorestframework/tests/files.py7
-rw-r--r--djangorestframework/tests/reverse.py2
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('',