summaryrefslogtreecommitdiff
path: root/django/test
diff options
context:
space:
mode:
authorMalcolm Tredinnick <malcolm.tredinnick@gmail.com>2008-10-07 09:04:55 +0000
committerMalcolm Tredinnick <malcolm.tredinnick@gmail.com>2008-10-07 09:04:55 +0000
commitfb4f82f2eabe29f9fa27612f485b3be8f497c107 (patch)
tree29c7e0b8f0c3da38f3bd0174d1afb604351dfb54 /django/test
parented48b0b37ebbb7ec5a8001b7957bb5f9e021e644 (diff)
Reverted r9186 -- Committed to the wrong branch (it's a feature addition).
git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@9187 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'django/test')
-rw-r--r--django/test/client.py63
1 files changed, 0 insertions, 63 deletions
diff --git a/django/test/client.py b/django/test/client.py
index 0cb8db3f4e..6a3401a2ff 100644
--- a/django/test/client.py
+++ b/django/test/client.py
@@ -284,69 +284,6 @@ class Client(object):
return self.request(**r)
- def head(self, path, data={}, **extra):
- """
- Request a response from the server using HEAD.
- """
- r = {
- 'CONTENT_LENGTH': None,
- 'CONTENT_TYPE': 'text/html; charset=utf-8',
- 'PATH_INFO': urllib.unquote(path),
- 'QUERY_STRING': urlencode(data, doseq=True),
- 'REQUEST_METHOD': 'HEAD',
- }
- r.update(extra)
-
- return self.request(**r)
-
- def options(self, path, data={}, **extra):
- """
- Request a response from the server using OPTIONS.
- """
- r = {
- 'CONTENT_LENGTH': None,
- 'CONTENT_TYPE': None,
- 'PATH_INFO': urllib.unquote(path),
- 'QUERY_STRING': urlencode(data, doseq=True),
- 'REQUEST_METHOD': 'OPTIONS',
- }
- r.update(extra)
-
- return self.request(**r)
-
- def put(self, path, data={}, content_type=MULTIPART_CONTENT, **extra):
- """
- Send a resource to the server using PUT.
- """
- if content_type is MULTIPART_CONTENT:
- post_data = encode_multipart(BOUNDARY, data)
- else:
- post_data = data
- r = {
- 'CONTENT_LENGTH': len(post_data),
- 'CONTENT_TYPE': content_type,
- 'PATH_INFO': urllib.unquote(path),
- 'REQUEST_METHOD': 'PUT',
- 'wsgi.input': FakePayload(post_data),
- }
- r.update(extra)
-
- return self.request(**r)
-
- def delete(self, path, data={}, **extra):
- """
- Send a DELETE request to the server.
- """
- r = {
- 'CONTENT_LENGTH': None,
- 'CONTENT_TYPE': None,
- 'PATH_INFO': urllib.unquote(path),
- 'REQUEST_METHOD': 'DELETE',
- }
- r.update(extra)
-
- return self.request(**r)
-
def login(self, **credentials):
"""
Sets the Client to appear as if it has successfully logged into a site.