You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[soc2009/http-wsgi-improvements] Modified tests/test_client_regress to expect correct behavior, which also fixes conflicts with charset handling in HttpResponse.
The specific cases modified test if the test client will encode the data it posts such that when writers of test views try to use the request, the data will be in the encoding they expect from the tests cases they have written. We do not expect HttpRequest to decode the incoming content yet, so the test views have to be created beforehand so that they decode using the proper codec (which they can determine from the content-type header).
Therefore, once the data is in the view and decoded, we then encode it into settings.DEFAULT_CHARSET, so we can expect normal behavior from HttpResponse, which is for the data to be encoded in settings.DEFAULT_CHARSET. That is what the test cases now assert.
HttpResponse charset handling now passes the entire test suite.
git-svn-id: http://code.djangoproject.com/svn/django/branches/soc2009/http-wsgi-improvements@11110 bcc190cf-cafb-0310-a4f2-bffc1f526a37
0 commit comments