On Thu, Aug 20, 2009 at 2:19 PM, ringemup <ringe...@gmail.com> wrote:

>
> I'm running the test listed below, and the test client is submitting a
> request to /test2/ despite the follow=False parameter in
> self.client.get()  -- am I doing something stupid?
>
>        def test_child_redirect(self):
>                response = self.client.get('/test/', follow=False,
> HTTP_HOST=settings.TESTING_DOMAINS[0])
>                self.assertRedirects(response, '/test2/',
> target_status_code=200)
>

I expect is it not the self.client.get that is following the redirect but
rather the assertRedirects.  assertRedirects checks that fetching the target
page returns target_status_code, and it needs to actually fetch the page to
check that.

Karen

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to