diff options
| author | Russell Keith-Magee <russell@keith-magee.com> | 2007-09-03 11:21:40 +0000 |
|---|---|---|
| committer | Russell Keith-Magee <russell@keith-magee.com> | 2007-09-03 11:21:40 +0000 |
| commit | 3bf4ef0c77f80e2ed7fab298679ab0c5f28bc900 (patch) | |
| tree | 89e50ada1d950d35b2862754dca2ec3c10099ca0 /tests/modeltests | |
| parent | afc6985267609d7782ec01817b051267fef48cd1 (diff) | |
Fixed #4988 -- In the test client, Added tracking of the client and request that caused a response so that the assertRedirects check can use the correct client when following a redirect. Well spotted, alex@gc-web.de.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6039 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'tests/modeltests')
| -rw-r--r-- | tests/modeltests/test_client/models.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/modeltests/test_client/models.py b/tests/modeltests/test_client/models.py index 200a71f6f9..2bc1dfe02b 100644 --- a/tests/modeltests/test_client/models.py +++ b/tests/modeltests/test_client/models.py @@ -234,7 +234,8 @@ class ClientTest(TestCase): self.assertRedirects(response, '/accounts/login/?next=/test_client/login_protected_view/') # Log in - self.client.login(username='testclient', password='password') + login = self.client.login(username='testclient', password='password') + self.assertTrue(login, 'Could not log in') # Request a page that requires a login response = self.client.get('/test_client/login_protected_view/') |
