diff options
| author | Carlton Gibson <carlton.gibson@noumenal.es> | 2020-08-11 10:11:42 +0200 |
|---|---|---|
| committer | Carlton Gibson <carlton.gibson@noumenal.es> | 2020-08-11 11:43:22 +0200 |
| commit | 02b474f2a4675bffee0cc1396a9c4ad22aef3580 (patch) | |
| tree | e31370936525cb5561c19c051047e225cfae7644 /tests | |
| parent | daf4f70eaeb63d38d5c640a2bb38d2557b7066ee (diff) | |
[3.1.x] Fixed #31865 -- Adjusted admin nav sidebar template to reduce debug logging.
Thanks to Mariusz Felisiak for review.
Backport of 0aeb802cf054cb369646c871b53c93a83c1fa58a from master
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/admin_views/test_nav_sidebar.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/admin_views/test_nav_sidebar.py b/tests/admin_views/test_nav_sidebar.py index 01cd4cfee7..b3d4955b19 100644 --- a/tests/admin_views/test_nav_sidebar.py +++ b/tests/admin_views/test_nav_sidebar.py @@ -77,6 +77,14 @@ class AdminSidebarTests(TestCase): self.assertContains(response, '<a href="%s">Users</a>' % url) self.assertNotContains(response, 'aria-current') + @override_settings(DEBUG=True) + def test_included_app_list_template_context_fully_set(self): + # All context variables should be set when rendering the sidebar. + url = reverse('test_with_sidebar:auth_user_changelist') + with self.assertRaisesMessage(AssertionError, 'no logs'): + with self.assertLogs('django.template', 'DEBUG'): + self.client.get(url) + @override_settings(ROOT_URLCONF='admin_views.test_nav_sidebar') class SeleniumTests(AdminSeleniumTestCase): |
