Browse files

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
  • Loading branch information...
1 parent ecc1ed4 commit a53ccc82978362aab07e4ccafb63a15fd6070e60 @freakboy3742 freakboy3742 committed Nov 12, 2008
Showing with 2 additions and 0 deletions.
  1. +2 −0 django/test/client.py
View
2 django/test/client.py
@@ -332,6 +332,7 @@ def put(self, path, data={}, content_type=MULTIPART_CONTENT, **extra):
'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 @@ def delete(self, path, data={}, **extra):
"""
r = {
'PATH_INFO': urllib.unquote(path),
+ 'QUERY_STRING': urlencode(data, doseq=True),
'REQUEST_METHOD': 'DELETE',
'wsgi.input': FakePayload('')
}

0 comments on commit a53ccc8

Please sign in to comment.