summaryrefslogtreecommitdiff
path: root/tests/admin_views/test_nav_sidebar.py
diff options
context:
space:
mode:
authorCarlton Gibson <carlton.gibson@noumenal.es>2020-08-11 10:11:42 +0200
committerCarlton Gibson <carlton@noumenal.es>2020-08-11 11:42:15 +0200
commit0aeb802cf054cb369646c871b53c93a83c1fa58a (patch)
treeaff56fba69ae1d53eb5723759eca325adb513551 /tests/admin_views/test_nav_sidebar.py
parent8a5683b6b2aede38edcff070686ed1fce470dec5 (diff)
Fixed #31865 -- Adjusted admin nav sidebar template to reduce debug logging.
Thanks to Mariusz Felisiak for review.
Diffstat (limited to 'tests/admin_views/test_nav_sidebar.py')
-rw-r--r--tests/admin_views/test_nav_sidebar.py8
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):