I routinely write views which use two built-in decorators, viz.,
login_required and transaction.commit_on_success. I am able to easily
write test cases for the former. A typical test case looks like this:
self.client.logout()
response = self.client.get(reverse('my_view'))
redirect_url = <login url>
self.assertRedirects(response, redirect_url, status_code=302,
target_status_code=200)
Similarly is there is any way to write test cases for views that use
commit_on_success? I know that the decorator works as intended :) but
I would still like to write test cases if possible.
Regards,
Manoj
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---