#31501: Update Documentation for "Testing Responses" section on Django
Documentation
-------------------------------------+-------------------------------------
Reporter: | Owner: nobody
AvuGradConnection |
Type: | Status: new
Cleanup/optimization |
Component: | Version: 2.2
Documentation | Keywords: Documentation,
Severity: Normal | Testing, Responses, Testing Client,
| TestClient, Django Rest Framework,
Triage Stage: | DRF, API's, Custom Views
Unreviewed | Has patch: 0
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 1
UI/UX: 0 |
-------------------------------------+-------------------------------------
https://docs.djangoproject.com/en/2.2/topics/testing/tools/#testing-
responses
Under the Testing Responses section of this page, it is detailed to the
user how to interact with the "Response" object returned from the client
request. There is an assumption made that the response will be a
'django.http.response.HttpResponse' (HttpResponse) whereas the endpoint
responsible for returning the response may/may not return a response
object that is an HttpResponse, or even a response like object at all.
Users should be made aware of this and the fact that the interface
described for communicating with the response might be significantly
different depending on what type of response the view handling the
response returns. This may or may not be a response like object. The user
should be made aware that if they are using any other mechanism besides
Django default views to return response objects then the response may
differ significantly from the the documentation interface explained.
**Example**: Django Rest Framework, manipulates(sub classes) the
HttpResponse in providing their "ApiViews" and this response object works
slightly differently from the class HttpResponse object described in the
documentation.
--
Ticket URL: <https://code.djangoproject.com/ticket/31501>
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 view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/060.7256b9aafebb59377d04ff90cb288df6%40djangoproject.com.