Hiya,
I trying to write test code for my views. I am using the following
approach.
>>>from django.test.client import Clien
>>>c = Client()
>>>c.get('/courses/system/home').status_code
301
The question is now: How do I 'redirect' in my code? I would expect
something along the lines of:
>>> response = c.get('/courses/system/home')
>>> if response.status_code == 301:
>>> actual_response = c.get(response.ulr)
Any ideas? Help? Pointers to documentation?
Thanks
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---