summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorstefan.ivic <contact@stefanivic.com>2024-06-08 15:44:17 +0200
committerSarah Boyce <42296566+sarahboyce@users.noreply.github.com>2024-06-18 16:49:53 +0200
commitce1ad98565d98b7939367b2bcab755c3555ceb42 (patch)
tree334799428166190114e9b72089661947ee9d99ac /tests
parenta0c44d4e23f8f509757f97f28fbbb1ced3382361 (diff)
Fixed #35505 -- Added extrabody block to admin/base.html.
Diffstat (limited to 'tests')
-rw-r--r--tests/admin_views/templates/admin/base_site.html2
-rw-r--r--tests/admin_views/tests.py4
2 files changed, 6 insertions, 0 deletions
diff --git a/tests/admin_views/templates/admin/base_site.html b/tests/admin_views/templates/admin/base_site.html
index 9714571289..27158e9e44 100644
--- a/tests/admin_views/templates/admin/base_site.html
+++ b/tests/admin_views/templates/admin/base_site.html
@@ -1,3 +1,5 @@
{% extends "admin/base.html" %}
{% block bodyclass %}bodyclass_consistency_check{% endblock %}
+
+{% block extrabody %}extrabody_check{% endblock extrabody %}
diff --git a/tests/admin_views/tests.py b/tests/admin_views/tests.py
index cb6815e7a8..763fa44ce8 100644
--- a/tests/admin_views/tests.py
+++ b/tests/admin_views/tests.py
@@ -1746,6 +1746,10 @@ class AdminCustomTemplateTests(AdminViewBasicTestCase):
response = self.client.get(reverse("admin:admin_views_section_add"))
self.assertContains(response, "bodyclass_consistency_check ")
+ def test_extended_extrabody(self):
+ response = self.client.get(reverse("admin:admin_views_section_add"))
+ self.assertContains(response, "extrabody_check\n</body>")
+
def test_change_password_template(self):
user = User.objects.get(username="super")
response = self.client.get(