mirror of
https://github.com/django/django.git
synced 2025-10-24 06:06:09 +00:00
Added a test for AdminSite.app_index_template; refs #8498.
This commit is contained in:
@@ -806,6 +806,12 @@ class CustomModelAdminTest(AdminViewBasicTestCase):
|
||||
self.assertTemplateUsed(response, 'custom_admin/index.html')
|
||||
self.assertContains(response, 'Hello from a custom index template *bar*')
|
||||
|
||||
def testCustomAdminSiteAppIndexViewandTemplate(self):
|
||||
response = self.client.get('/test_admin/admin2/admin_views/')
|
||||
self.assertIsInstance(response, TemplateResponse)
|
||||
self.assertTemplateUsed(response, 'custom_admin/app_index.html')
|
||||
self.assertContains(response, 'Hello from a custom app_index template')
|
||||
|
||||
def testCustomAdminSitePasswordChangeTemplate(self):
|
||||
response = self.client.get('/test_admin/admin2/password_change/')
|
||||
self.assertIsInstance(response, TemplateResponse)
|
||||
|
||||
Reference in New Issue
Block a user