diff options
author | Mariusz Felisiak <felisiak.mariusz@gmail.com> | 2022-02-04 08:08:27 +0100 |
---|---|---|
committer | Mariusz Felisiak <felisiak.mariusz@gmail.com> | 2022-02-07 20:37:05 +0100 |
commit | 7119f40c9881666b6f9b5cf7df09ee1d21cc8344 (patch) | |
tree | fa50869f5614295f462d9bf77fec59365c621609 /tests/admin_docs | |
parent | 9c19aff7c7561e3a82978a272ecdaad40dda5c00 (diff) | |
download | django-7119f40c9881666b6f9b5cf7df09ee1d21cc8344.tar.gz |
Refs #33476 -- Refactored code to strictly match 88 characters line length.
Diffstat (limited to 'tests/admin_docs')
-rw-r--r-- | tests/admin_docs/test_views.py | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/tests/admin_docs/test_views.py b/tests/admin_docs/test_views.py index c11b8f71c2..d85f401855 100644 --- a/tests/admin_docs/test_views.py +++ b/tests/admin_docs/test_views.py @@ -54,7 +54,8 @@ class AdminDocViewTests(TestDataMixin, AdminDocsTestCase): response = self.client.get(reverse("django-admindocs-views-index")) self.assertContains( response, - '<h3><a href="/admindocs/views/django.contrib.admindocs.views.BaseAdminDocsView/">/admindocs/</a></h3>', + '<h3><a href="/admindocs/views/django.contrib.admindocs.views.' + 'BaseAdminDocsView/">/admindocs/</a></h3>', html=True, ) self.assertContains(response, "Views by namespace test") @@ -73,7 +74,9 @@ class AdminDocViewTests(TestDataMixin, AdminDocsTestCase): response = self.client.get(reverse("django-admindocs-views-index")) self.assertContains( response, - '<h3><a href="/admindocs/views/django.contrib.admin.sites.AdminSite.index/">/admin/</a></h3>', + "<h3>" + '<a href="/admindocs/views/django.contrib.admin.sites.AdminSite.index/">' + "/admin/</a></h3>", html=True, ) @@ -118,7 +121,8 @@ class AdminDocViewTests(TestDataMixin, AdminDocsTestCase): response = self.client.get(reverse("django-admindocs-models-index")) self.assertContains( response, - '<h2 id="app-auth">Authentication and Authorization (django.contrib.auth)</h2>', + '<h2 id="app-auth">Authentication and Authorization (django.contrib.auth)' + "</h2>", html=True, ) @@ -380,11 +384,15 @@ class TestModelDetailView(TestDataMixin, AdminDocsTestCase): def test_model_docstring_renders_correctly(self): summary = ( - '<h2 class="subhead"><p>Stores information about a person, related to <a class="reference external" ' - 'href="/admindocs/models/myapp.company/">myapp.Company</a>.</p></h2>' + '<h2 class="subhead"><p>Stores information about a person, related to ' + '<a class="reference external" href="/admindocs/models/myapp.company/">' + "myapp.Company</a>.</p></h2>" ) subheading = "<p><strong>Notes</strong></p>" - body = '<p>Use <tt class="docutils literal">save_changes()</tt> when saving this object.</p>' + body = ( + '<p>Use <tt class="docutils literal">save_changes()</tt> when saving this ' + "object.</p>" + ) model_body = ( '<dl class="docutils"><dt><tt class="' 'docutils literal">company</tt></dt><dd>Field storing <a class="' |