summaryrefslogtreecommitdiff
path: root/tests/regressiontests/admin_views/tests.py
diff options
context:
space:
mode:
authorJannis Leidel <jannis@leidel.info>2010-01-12 23:34:46 +0000
committerJannis Leidel <jannis@leidel.info>2010-01-12 23:34:46 +0000
commita2056919799e48f053fa16b65569fc1e8f57ebe1 (patch)
treef31347588a67ce910973d221396c2100b4e155b2 /tests/regressiontests/admin_views/tests.py
parent31f3a8c1ad3b6ec33c503241484107bf35cdadba (diff)
Fixed #8933 - Allow more admin templates to be overridden.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12217 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'tests/regressiontests/admin_views/tests.py')
-rw-r--r--tests/regressiontests/admin_views/tests.py15
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/regressiontests/admin_views/tests.py b/tests/regressiontests/admin_views/tests.py
index 4d6e1d5139..7a20aaacd5 100644
--- a/tests/regressiontests/admin_views/tests.py
+++ b/tests/regressiontests/admin_views/tests.py
@@ -286,11 +286,26 @@ class CustomModelAdminTest(AdminViewBasicTest):
self.assertTemplateUsed(request, 'custom_admin/login.html')
self.assert_('Hello from a custom login template' in request.content)
+ def testCustomAdminSiteLogoutTemplate(self):
+ request = self.client.get('/test_admin/admin2/logout/')
+ self.assertTemplateUsed(request, 'custom_admin/logout.html')
+ self.assert_('Hello from a custom logout template' in request.content)
+
def testCustomAdminSiteIndexViewAndTemplate(self):
request = self.client.get('/test_admin/admin2/')
self.assertTemplateUsed(request, 'custom_admin/index.html')
self.assert_('Hello from a custom index template *bar*' in request.content)
+ def testCustomAdminSitePasswordChangeTemplate(self):
+ request = self.client.get('/test_admin/admin2/password_change/')
+ self.assertTemplateUsed(request, 'custom_admin/password_change_form.html')
+ self.assert_('Hello from a custom password change form template' in request.content)
+
+ def testCustomAdminSitePasswordChangeDoneTemplate(self):
+ request = self.client.get('/test_admin/admin2/password_change/done/')
+ self.assertTemplateUsed(request, 'custom_admin/password_change_done.html')
+ self.assert_('Hello from a custom password change done template' in request.content)
+
def testCustomAdminSiteView(self):
self.client.login(username='super', password='secret')
response = self.client.get('/test_admin/%s/my_view/' % self.urlbit)