summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
Diffstat (limited to 'docs')
-rw-r--r--docs/testing.txt25
1 files changed, 15 insertions, 10 deletions
diff --git a/docs/testing.txt b/docs/testing.txt
index bb62273bea..22a7e48a7a 100644
--- a/docs/testing.txt
+++ b/docs/testing.txt
@@ -577,13 +577,25 @@ Specifically, a ``Response`` object has the following attributes:
=============== ==========================================================
Attribute Description
=============== ==========================================================
- ``status_code`` The HTTP status of the response, as an integer. See
- RFC2616_ for a full list of HTTP status codes.
+ ``client`` The test client that was used to make the request that
+ resulted in the response.
``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).
+ ``context`` The template ``Context`` instance that was used to render
+ the template that produced the response content.
+
+ If the rendered page used multiple templates, then
+ ``context`` will be a list of ``Context``
+ objects, in the order in which they were rendered.
+
+ ``request`` The request data that stimulated the response.
+
+ ``status_code`` The HTTP status of the response, as an integer. See
+ RFC2616_ for a full list of HTTP status codes.
+
``template`` The ``Template`` instance that was used to render the
final content. Use ``template.name`` to get the
template's file name, if the template was loaded from a
@@ -594,13 +606,6 @@ Specifically, a ``Response`` object has the following attributes:
using `template inheritance`_ -- then ``template`` will
be a list of ``Template`` instances, in the order in
which they were rendered.
-
- ``context`` The template ``Context`` instance that was used to render
- the template that produced the response content.
-
- As with ``template``, if the rendered page used multiple
- templates, then ``context`` will be a list of ``Context``
- objects, in the order in which they were rendered.
=============== ==========================================================
.. _RFC2616: http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html
@@ -828,7 +833,7 @@ useful for testing Web applications:
``assertRedirects(response, expected_url, status_code=302, target_status_code=200)``
Asserts that the response return a ``status_code`` redirect status,
- it redirected to ``expected_url`` (including any GET data), and the subsequent
+ it redirected to ``expected_url`` (including any GET data), and the subsequent
page was received with ``target_status_code``.
``assertTemplateUsed(response, template_name)``