mirror of
https://github.com/django/django.git
synced 2025-06-06 20:19:13 +00:00
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
This commit is contained in:
parent
ecc1ed4ce1
commit
a53ccc8297
@ -332,6 +332,7 @@ class Client(object):
|
|||||||
'CONTENT_LENGTH': len(post_data),
|
'CONTENT_LENGTH': len(post_data),
|
||||||
'CONTENT_TYPE': content_type,
|
'CONTENT_TYPE': content_type,
|
||||||
'PATH_INFO': urllib.unquote(path),
|
'PATH_INFO': urllib.unquote(path),
|
||||||
|
'QUERY_STRING': urlencode(data, doseq=True),
|
||||||
'REQUEST_METHOD': 'PUT',
|
'REQUEST_METHOD': 'PUT',
|
||||||
'wsgi.input': FakePayload(post_data),
|
'wsgi.input': FakePayload(post_data),
|
||||||
}
|
}
|
||||||
@ -345,6 +346,7 @@ class Client(object):
|
|||||||
"""
|
"""
|
||||||
r = {
|
r = {
|
||||||
'PATH_INFO': urllib.unquote(path),
|
'PATH_INFO': urllib.unquote(path),
|
||||||
|
'QUERY_STRING': urlencode(data, doseq=True),
|
||||||
'REQUEST_METHOD': 'DELETE',
|
'REQUEST_METHOD': 'DELETE',
|
||||||
'wsgi.input': FakePayload('')
|
'wsgi.input': FakePayload('')
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user