Saturday, April 16, 2011

Aw: How to unit test if user has access to page

Also beware! Only do a client.post if you really want to test that a user submits a form. Usually when a not-logged-in-user wants to go to a secured page immediately he will try a get request and just enter the URL. Sometimes your view behaves differently on get and on post (most of the times) so you probably should test both scenarios.

Best regards,
Martin

--
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+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate