Checking user permission denied in Django Selenium tests

26 views
Skip to first unread message

Cherie Pun

unread,
Jul 29, 2015, 9:06:07 AM7/29/15
to Django users

On the local server that I start up, if the user does not have the required permission for a particular view, they will be redirected to the 403 page (I am using the permission_required decorator)

However, in the selenium test, the PermissionDenied exception is thrown and the user is redirected to the internal server error page (500) instead.

Does the server not work the same way when in selenium testing environment? Should I catch that exception in order to check permission is denied instead of checking for the 403 page? Cheers!


Reply all
Reply to author
Forward
0 new messages