#27113: Add tests for setting HttpRequest.encoding
------------------------------------------------+------------------------
               Reporter:  timgraham             |          Owner:  nobody
                   Type:  Cleanup/optimization  |         Status:  new
              Component:  HTTP handling         |        Version:  1.10
               Severity:  Normal                |       Keywords:
           Triage Stage:  Accepted              |      Has patch:  0
    Needs documentation:  0                     |    Needs tests:  0
Patch needs improvement:  0                     |  Easy pickings:  0
                  UI/UX:  0                     |
------------------------------------------------+------------------------
 Looking at Django's coverage report, I found some untested lines:
 
[https://github.com/django/django/blob/bc1e2d8e8edde6cc7d2657c68242a13ee65a15b8/django/http/request.py#L227-L231].
 Removing them doesn't cause any tests to fail.

 A test should be added to demonstrate
 [https://docs.djangoproject.com/en/dev/ref/request-
 response/#django.http.HttpRequest.encoding the documented behavior]:

  You can write to `HttpRequest.encoding`  to change the encoding used when
 accessing the form data. Any subsequent attribute accesses (such as
 reading from GET or POST) will use the new encoding value.

 The test might look similar the following test, but should use a value
 that appears differently after the encoding changes:

 https://code.djangoproject.com/attachment/ticket/27107/27107-test.diff

--
Ticket URL: <https://code.djangoproject.com/ticket/27113>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/052.27715ede83483bf88d8c6b67b92db553%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to