summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/admin_views/tests.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/tests/admin_views/tests.py b/tests/admin_views/tests.py
index a64e4d76d9..881ef51d56 100644
--- a/tests/admin_views/tests.py
+++ b/tests/admin_views/tests.py
@@ -4832,19 +4832,19 @@ class AdminCustomSaveRelatedTests(TestCase):
@override_settings(PASSWORD_HASHERS=('django.contrib.auth.hashers.SHA1PasswordHasher',),
ROOT_URLCONF="admin_views.urls")
-class AdminViewLogoutTest(TestCase):
+class AdminViewLogoutTests(TestCase):
fixtures = ['admin-views-users.xml']
- def setUp(self):
+ def test_logout(self):
self.client.login(username='super', password='secret')
-
- def test_client_logout_url_can_be_used_to_login(self):
response = self.client.get(reverse('admin:logout'))
self.assertEqual(response.status_code, 200)
self.assertTemplateUsed(response, 'registration/logged_out.html')
self.assertEqual(response.request['PATH_INFO'], reverse('admin:logout'))
+ self.assertFalse(response.context['has_permission'])
+ self.assertNotContains(response, 'user-tools') # user-tools div shouldn't visible.
- # we are now logged out
+ def test_client_logout_url_can_be_used_to_login(self):
response = self.client.get(reverse('admin:logout'))
self.assertEqual(response.status_code, 302) # we should be redirected to the login page.