mirror of https://github.com/django/django.git
Refs #33865 -- Made RequestsTests.test_set_encoding_clears_GET use FakePayload.
The input stream, wsgi.input, must be a file-like object. The existing implementation of LimitedStream was lax and allowed an empty string to be passed incorrectly. See https://wsgi.readthedocs.io/en/latest/definitions.html#envvar-wsgi.input
This commit is contained in:
parent
63d1cb0092
commit
7a1543d9f6
|
@ -640,10 +640,11 @@ class RequestsTests(SimpleTestCase):
|
|||
self.assertEqual(request.POST, {"name": ["Hello GĂŒnter"]})
|
||||
|
||||
def test_set_encoding_clears_GET(self):
|
||||
payload = FakePayload("")
|
||||
request = WSGIRequest(
|
||||
{
|
||||
"REQUEST_METHOD": "GET",
|
||||
"wsgi.input": "",
|
||||
"wsgi.input": payload,
|
||||
"QUERY_STRING": "name=Hello%20G%C3%BCnter",
|
||||
}
|
||||
)
|
||||
|
|
Loading…
Reference in New Issue