I have started using Django's testing framework, and everything was working fine until I started testing authenticated pages.
For the sake of simplicity, let's say that this is a test:
user =User.objects.create_user('temporary','firstname.lastname@example.org','temporary')def test_secure_page(self):
c =Client()print c.login(username='temporary', password='temporary')
response = c.get('/users/secure/', follow=True)
After I run this test, it fails, and I see that printing return value of login() returns True, but response.content gets redirected to login page (if login fails authentication decorator redirects to login page). I have put a break point in decorator that does authentication: