Skip to content

Commit

Permalink
Fixed #9369 -- Added QUERY_STRING info for PUT and DELETE requests in…
Browse files Browse the repository at this point in the history
… 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
freakboy3742 committed Nov 12, 2008
1 parent ecc1ed4 commit a53ccc8
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions django/test/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -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),
}
Expand All @@ -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('')
}
Expand Down

0 comments on commit a53ccc8

Please sign in to comment.