#3499: Add a "redirect_to" attribute (similar to status_code) to
HttpResponseRedirect  and HttpResponsePermanentRedirect to help with
testing
----------------------------------------+-----------------------------------
          Reporter:  [EMAIL PROTECTED]  |         Owner:  adrian                
            
            Status:  new                |     Component:  Core framework        
            
           Version:  SVN                |      Keywords:  HttpResponseRedirect 
, redirect_to
             Stage:  Unreviewed         |     Has_patch:  1                     
            
        Needs_docs:  0                  |   Needs_tests:  0                     
            
Needs_better_patch:  0                  |  
----------------------------------------+-----------------------------------
 Consider this test:
 
 {{{
 response = self.client.post(url, params)
 
 self.failUnlessEqual(response.status_code, 302)
 self.failUnlessEqual(response.headers['Location'], some_other_url)
 }}}
 
 It would be easier to do the following instead, treating redirect_to as an
 attribute.
 
 {{{
 self.failUnlessEqual(response.redirect_to, some_other_url)
 }}}

-- 
Ticket URL: <http://code.djangoproject.com/ticket/3499>
Django Code <http://code.djangoproject.com/>
The web framework for perfectionists with deadlines
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to