Skip to content

Commit

Permalink
Fixed #4360 -- Corrected where HTTP headers are in the test response.…
Browse files Browse the repository at this point in the history
… Also noted that it is an extension of HttpResponse, not a simpler object. Thanks, John Shaffer for the first part.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@6147 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information
malcolmt committed Sep 14, 2007
1 parent 87e77ff commit 1e94ef8
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions docs/testing.txt
Expand Up @@ -569,8 +569,8 @@ Testing responses

The ``get()`` and ``post()`` methods both return a ``Response`` object. This
``Response`` object is *not* the same as the ``HttpResponse`` object returned
Django views; this object is simpler and has some additional data useful for
tests.
Django views; the test response object has some additional data useful for
test code to verify.

Specifically, a ``Response`` object has the following attributes:

Expand All @@ -582,7 +582,7 @@ Specifically, a ``Response`` object has the following attributes:

``content`` The body of the response, as a string. This is the final
page content as rendered by the view, or any error
message (such as the URL for a 302 redirect).
message.

``context`` The template ``Context`` instance that was used to render
the template that produced the response content.
Expand All @@ -591,6 +591,8 @@ Specifically, a ``Response`` object has the following attributes:
``context`` will be a list of ``Context``
objects, in the order in which they were rendered.

``headers`` The HTTP headers of the response. This is a dictionary.

``request`` The request data that stimulated the response.

``status_code`` The HTTP status of the response, as an integer. See
Expand Down

0 comments on commit 1e94ef8

Please sign in to comment.