mirror of
https://github.com/django/django.git
synced 2025-11-25 05:04:26 +00:00
Fixed #34919 -- Added scope attribute to admindocs model templates.
This commit is contained in:
parent
ad41f1c53a
commit
bdf30b952c
3 changed files with 21 additions and 7 deletions
|
|
@ -240,6 +240,20 @@ class TestModelDetailView(TestDataMixin, AdminDocsTestCase):
|
|||
reverse("django-admindocs-models-detail", args=["admin_docs", "Person"])
|
||||
)
|
||||
|
||||
def test_table_headers(self):
|
||||
tests = [
|
||||
("Method", 1),
|
||||
("Arguments", 1),
|
||||
("Description", 2),
|
||||
("Field", 1),
|
||||
("Type", 1),
|
||||
("Method", 1),
|
||||
]
|
||||
for table_header, count in tests:
|
||||
self.assertContains(
|
||||
self.response, f'<th scope="col">{table_header}</th>', count=count
|
||||
)
|
||||
|
||||
def test_method_excludes(self):
|
||||
"""
|
||||
Methods that begin with strings defined in
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue