diff options
| author | Russell Keith-Magee <russell@keith-magee.com> | 2007-07-12 15:26:37 +0000 |
|---|---|---|
| committer | Russell Keith-Magee <russell@keith-magee.com> | 2007-07-12 15:26:37 +0000 |
| commit | b8d0dc73c762bedc0a36bb380cded62a7b3ea162 (patch) | |
| tree | 99466bf5a884ee384e3efa57e28f6880481dd07b /tests/modeltests/test_client/models.py | |
| parent | b9232cd955496b69444ca458fa2ba45ab9e25c34 (diff) | |
Fixed #4526 -- Modified the test Client login method to fail when a user is inactive. Thanks, marcin@elksoft.pl.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@5677 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'tests/modeltests/test_client/models.py')
| -rw-r--r-- | tests/modeltests/test_client/models.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/modeltests/test_client/models.py b/tests/modeltests/test_client/models.py index 06e574590f..91c5d8c72f 100644 --- a/tests/modeltests/test_client/models.py +++ b/tests/modeltests/test_client/models.py @@ -228,6 +228,12 @@ class ClientTest(TestCase): login = self.client.login(username='otheruser', password='nopassword') self.failIf(login) + def test_view_with_inactive_login(self): + "Request a page that is protected with @login, but use an inactive login" + + login = self.client.login(username='inactive', password='password') + self.failIf(login) + def test_session_modifying_view(self): "Request a page that modifies the session" # Session value isn't set initially |
