diff options
| author | Adrian Holovaty <adrian@holovaty.com> | 2007-09-15 21:21:37 +0000 |
|---|---|---|
| committer | Adrian Holovaty <adrian@holovaty.com> | 2007-09-15 21:21:37 +0000 |
| commit | fb6a0c8ffa1cd74c63aaf4b011665e5952d449e7 (patch) | |
| tree | 4af2f7d6a2d1d91adf80243c67176effecf0c8b8 /docs/testing.txt | |
| parent | c8f6e485b8b7329418ca030421b9bde4ec164854 (diff) | |
queryset-refactor: Merged to [6155]
git-svn-id: http://code.djangoproject.com/svn/django/branches/queryset-refactor@6332 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'docs/testing.txt')
| -rw-r--r-- | docs/testing.txt | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/docs/testing.txt b/docs/testing.txt index 22a7e48a7a..e15abd50d5 100644 --- a/docs/testing.txt +++ b/docs/testing.txt @@ -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: @@ -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. @@ -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 |
