Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Fixed #4360 -- Corrected where HTTP headers are in the test response.…

… 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...
commit 1e94ef85bf3ea6f0195314ed0d7f2fb051c33ef3 1 parent 87e77ff
Malcolm Tredinnick authored September 14, 2007

Showing 1 changed file with 5 additions and 3 deletions. Show diff stats Hide diff stats

  1. 8  docs/testing.txt
8  docs/testing.txt
@@ -569,8 +569,8 @@ Testing responses
569 569
 
570 570
 The ``get()`` and ``post()`` methods both return a ``Response`` object. This
571 571
 ``Response`` object is *not* the same as the ``HttpResponse`` object returned
572  
-Django views; this object is simpler and has some additional data useful for
573  
-tests.
  572
+Django views; the test response object has some additional data useful for
  573
+test code to verify.
574 574
 
575 575
 Specifically, a ``Response`` object has the following attributes:
576 576
 
@@ -582,7 +582,7 @@ Specifically, a ``Response`` object has the following attributes:
582 582
 
583 583
     ``content``      The body of the response, as a string. This is the final
584 584
                      page content as rendered by the view, or any error
585  
-                     message (such as the URL for a 302 redirect).
  585
+                     message.
586 586
 
587 587
     ``context``      The template ``Context`` instance that was used to render
588 588
                      the template that produced the response content.
@@ -591,6 +591,8 @@ Specifically, a ``Response`` object has the following attributes:
591 591
                      ``context`` will be a list of ``Context``
592 592
                      objects, in the order in which they were rendered.
593 593
 
  594
+    ``headers``      The HTTP headers of the response. This is a dictionary.
  595
+
594 596
     ``request``      The request data that stimulated the response.
595 597
 
596 598
     ``status_code``  The HTTP status of the response, as an integer. See

0 notes on commit 1e94ef8

Please sign in to comment.
Something went wrong with that request. Please try again.