                      setattr(response, detail, data[detail])
              else:
                  setattr(response, detail, None)
  
          if response.cookies:
              self.cookies.update(response.cookies)
  
          if 'django.contrib.sessions' in settings.INSTALLED_APPS:
              from django.contrib.sessions.middleware import SessionWrapper
              cookie = self.cookies.get(settings.SESSION_COOKIE_NAME, None)
 
</s> remove     (r'^session_view/$', views.session_view)
 </s> add     (r'^session_view/$', views.session_view),
    (r'^broken_view/$', views.broken_view)
        # Look for a signalled exception and reraise it
        if self.exc_info:
            raise self.exc_info[1], None, self.exc_info[2]
        
        # Update persistent cookie and session data
                      setattr(response, detail, data[detail])
              else:
                  setattr(response, detail, None)
  
        # Look for a signalled exception and reraise it
        if self.exc_info:
            raise self.exc_info[1], None, self.exc_info[2]
        
        # Update persistent cookie and session data
          if response.cookies:
              self.cookies.update(response.cookies)
  
          if 'django.contrib.sessions' in settings.INSTALLED_APPS:
              from django.contrib.sessions.middleware import SessionWrapper
              cookie = self.cookies.get(settings.SESSION_COOKIE_NAME, None)
keep keep keep add keep 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 
django/test/client.py