Django

Code

Changeset 6147

Show
Ignore:
Timestamp:
09/13/07 20:21:34 (1 year ago)
Author:
mtredinnick
Message:

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.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • django/trunk/docs/testing.txt

    r6039 r6147  
    570570The ``get()`` and ``post()`` methods both return a ``Response`` object. This 
    571571``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
     572Django views; the test response object has some additional data useful for 
     573test code to verify
    574574 
    575575Specifically, a ``Response`` object has the following attributes: 
     
    583583    ``content``      The body of the response, as a string. This is the final 
    584584                     page content as rendered by the view, or any error 
    585                      message (such as the URL for a 302 redirect)
     585                     message
    586586 
    587587    ``context``      The template ``Context`` instance that was used to render 
     
    591591                     ``context`` will be a list of ``Context`` 
    592592                     objects, in the order in which they were rendered. 
     593 
     594    ``headers``      The HTTP headers of the response. This is a dictionary. 
    593595 
    594596    ``request``      The request data that stimulated the response.