  
  .. _RFC2616: http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html
  
  Persistent state
  ~~~~~~~~~~~~~~~~
  
  The Test Client is stateful; if a cookie is returned as part of a response,
  that cookie is provided as part of the next request issued by that Client
 
</s> remove     (r'^session_view/$', views.session_view)
 </s> add     (r'^session_view/$', views.session_view),
    (r'^broken_view/$', views.broken_view)
Exceptions
~~~~~~~~~~

If you point the Test Client at a view that raises an exception, that exception
will be visible in the test case. You can then use a standard ``try...catch`` 
block, or ``unittest.TestCase.assertRaises()`` to test for exceptions.

The only exceptions that are not visible in a Test Case are ``Http404``, 
``PermissionDenied`` and ``SystemExit``. Django catches these exceptions 
internally and converts them into the appropriate HTTP responses codes.

  
  .. _RFC2616: http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html
  
Exceptions
~~~~~~~~~~

If you point the Test Client at a view that raises an exception, that exception
will be visible in the test case. You can then use a standard ``try...catch`` 
block, or ``unittest.TestCase.assertRaises()`` to test for exceptions.

The only exceptions that are not visible in a Test Case are ``Http404``, 
``PermissionDenied`` and ``SystemExit``. Django catches these exceptions 
internally and converts them into the appropriate HTTP responses codes.

  Persistent state
  ~~~~~~~~~~~~~~~~
  
  The Test Client is stateful; if a cookie is returned as part of a response,
  that cookie is provided as part of the next request issued by that Client
keep keep add keep keep keep keep keep
 Fixed #3162 -- Added coded to catch and rethrow exceptions that are thrown by the views visited by the test client. Thanks, Ben <afternoon@uk2.net>.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@4482 bcc190cf-cafb-0310-a4f2-bffc1f526a37 
docs/testing.txt