Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
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...
commit a53ccc82978362aab07e4ccafb63a15fd6070e60 1 parent ecc1ed4
@freakboy3742 freakboy3742 authored
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('')
}
Please sign in to comment.
Something went wrong with that request. Please try again.