mirror of
https://github.com/django/django.git
synced 2025-10-24 14:16:09 +00:00
Fixed #17890 -- Added an extra_context parameter to AdminSite.password_change().
This commit is contained in:
committed by
Tim Graham
parent
3131e9cef5
commit
c8dcded930
@@ -1012,6 +1012,12 @@ class CustomModelAdminTest(AdminViewBasicTestCase):
|
||||
self.assertTemplateUsed(response, 'custom_admin/password_change_form.html')
|
||||
self.assertContains(response, 'Hello from a custom password change form template')
|
||||
|
||||
def test_custom_admin_site_password_change_with_extra_context(self):
|
||||
response = self.client.get('/test_admin/admin2/password_change/')
|
||||
self.assertIsInstance(response, TemplateResponse)
|
||||
self.assertTemplateUsed(response, 'custom_admin/password_change_form.html')
|
||||
self.assertContains(response, 'eggs')
|
||||
|
||||
def test_custom_admin_site_password_change_done_template(self):
|
||||
response = self.client.get('/test_admin/admin2/password_change/done/')
|
||||
self.assertIsInstance(response, TemplateResponse)
|
||||
|
||||
Reference in New Issue
Block a user