summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRussell Keith-Magee <russell@keith-magee.com>2008-11-12 11:20:32 +0000
committerRussell Keith-Magee <russell@keith-magee.com>2008-11-12 11:20:32 +0000
commita53ccc82978362aab07e4ccafb63a15fd6070e60 (patch)
tree3db5144a6c898dbdf26561fc546c7fd134506306
parentecc1ed4ce1faa0b052ddd31487d24a4f9f9ea37a (diff)
Fixed #9369 -- Added QUERY_STRING info for PUT and DELETE requests in the test client. Thanks to david for the report.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9397 bcc190cf-cafb-0310-a4f2-bffc1f526a37
-rw-r--r--django/test/client.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/django/test/client.py b/django/test/client.py
index e1d73aa476..84513a1479 100644
--- a/django/test/client.py
+++ b/django/test/client.py
@@ -332,6 +332,7 @@ class Client(object):
'CONTENT_LENGTH': len(post_data),
'CONTENT_TYPE': content_type,
'PATH_INFO': urllib.unquote(path),
+ 'QUERY_STRING': urlencode(data, doseq=True),
'REQUEST_METHOD': 'PUT',
'wsgi.input': FakePayload(post_data),
}
@@ -345,6 +346,7 @@ class Client(object):
"""
r = {
'PATH_INFO': urllib.unquote(path),
+ 'QUERY_STRING': urlencode(data, doseq=True),
'REQUEST_METHOD': 'DELETE',
'wsgi.input': FakePayload('')
}