On 7 September 2011 11:52, MATHIEU <[email protected]> wrote:

> For the GET method, I have tried the following code:
> ================================
>    def test_patron_phone_get_form(self):
>            self.client.login(usernamer='[email protected]',
> password='alex')
>            response = self.client.get(reverse('patron_edit_phone'))
>            self.assertEquals(response.status_code, 200)
> ================================
> But this doesn't work. Instead of getting a status_code=200, I get a
> status_code=302. Why?
>

If this is a cut'n'paste of your code, you have a typo in the
self.client.login() call - you're passing "usernamer" not "username"

Malcolm

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" 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-users?hl=en.

Reply via email to