1
0
mirror of https://github.com/django/django.git synced 2025-10-24 06:06:09 +00:00

Fixed #34911 -- Corrected HTML heading levels on admindocs' main page.

This commit is contained in:
laserhyena
2023-10-19 15:48:12 -04:00
committed by Mariusz Felisiak
parent 89d2ae257b
commit 21382e2743
2 changed files with 16 additions and 5 deletions

View File

@@ -7583,6 +7583,17 @@ class AdminDocsTest(TestCase):
response, '<li><a href="#built_in-add">add</a></li>', html=True
)
def test_index_headers(self):
response = self.client.get(reverse("django-admindocs-docroot"))
self.assertContains(response, "<h1>Documentation</h1>")
self.assertContains(response, '<h2><a href="tags/">Tags</a></h2>')
self.assertContains(response, '<h2><a href="filters/">Filters</a></h2>')
self.assertContains(response, '<h2><a href="models/">Models</a></h2>')
self.assertContains(response, '<h2><a href="views/">Views</a></h2>')
self.assertContains(
response, '<h2><a href="bookmarklets/">Bookmarklets</a></h2>'
)
@override_settings(
ROOT_URLCONF="admin_views.urls",