django/django — pull request #2778 by duncanparkes (2014-06-08 21:55:29+00:00)
Title: Made GET and POST attributes of an HttpRequest object QueryDicts.

Previously, `GET` and `POST` on an `HttpRequest` were created in the `__init__`
method as dictionaries. This was not something you would usually notice
causing trouble in production as you'd only see a `WSGIRequest`, but in
testing using the test client, calling `.getlist` on `GET` or `POST`
for a request with no get/post data used to result in an `AttributeError`.

Changed `GET` and `POST` on a vanilla `HttpRequest` object to be mutable
`QueryDict`s (mutable because the Django tests, and probably many
third party tests were expecting it).

Also added a regression test for this by adding calls to `.getlist` to
the test on a newly created `HttpRequest`.