diff options
| author | François Freitag <mail@franek.fr> | 2021-01-07 17:54:40 +0100 |
|---|---|---|
| committer | Mariusz Felisiak <felisiak.mariusz@gmail.com> | 2021-03-02 20:35:33 +0100 |
| commit | 7ca7f4495ba746279b734695a8dd137bf7ee0bab (patch) | |
| tree | 671066b8a0f4a75d9481e0ce89bd12f7c7b34898 /tests/admin_views/test_nav_sidebar.py | |
| parent | d3ecef26b9fda02b88f925a800ae38dd5873c878 (diff) | |
Refs #21429 -- Added SimpleTestCase.assertNoLogs() on Python < 3.10.
Diffstat (limited to 'tests/admin_views/test_nav_sidebar.py')
| -rw-r--r-- | tests/admin_views/test_nav_sidebar.py | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/tests/admin_views/test_nav_sidebar.py b/tests/admin_views/test_nav_sidebar.py index be1cfb5209..fc1d70baee 100644 --- a/tests/admin_views/test_nav_sidebar.py +++ b/tests/admin_views/test_nav_sidebar.py @@ -82,9 +82,8 @@ class AdminSidebarTests(TestCase): 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) + with self.assertNoLogs('django.template', 'DEBUG'): + self.client.get(url) @override_settings(ROOT_URLCONF='admin_views.test_nav_sidebar') |
