From 0aeb802cf054cb369646c871b53c93a83c1fa58a Mon Sep 17 00:00:00 2001 From: Carlton Gibson Date: Tue, 11 Aug 2020 10:11:42 +0200 Subject: Fixed #31865 -- Adjusted admin nav sidebar template to reduce debug logging. Thanks to Mariusz Felisiak for review. --- tests/admin_views/test_nav_sidebar.py | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'tests/admin_views') 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, 'Users' % 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): -- cgit v1.3