Thanks, K. I think one of my main issues, after looking at your tests, is 
that I'm not currently using the client to test the redirect. I have this 
test as a part of my functional_tests.py, but it sounds like I need to 
possibly build this into my unit tests as I see your test is in tests.py. 
I'm going move some of this work around between functional and unit tests 
and then try out your suggestion with the client. 

Tony

On Tuesday, June 17, 2014 7:26:27 PM UTC-7, Antonio Alaniz wrote:
>
> I'm testing a redirect that would include the primary key. Can anyone tell 
> me how I can test the redirect URL if it involves the primary key? Will the 
> following work?:
>
> self.assertRedirects(response, 'message/(?P<message_id>\d+)/', 200)
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/268c0cf6-2829-445a-a97d-8c7832121247%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to