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/template_tests | |
parent | d3ecef26b9fda02b88f925a800ae38dd5873c878 (diff) | |
download | django-7ca7f4495ba746279b734695a8dd137bf7ee0bab.tar.gz |
Refs #21429 -- Added SimpleTestCase.assertNoLogs() on Python < 3.10.
Diffstat (limited to 'tests/template_tests')
-rw-r--r-- | tests/template_tests/test_logging.py | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/tests/template_tests/test_logging.py b/tests/template_tests/test_logging.py index 81f2661cfc..a5bdebaf16 100644 --- a/tests/template_tests/test_logging.py +++ b/tests/template_tests/test_logging.py @@ -62,6 +62,5 @@ class VariableResolveLoggingTests(SimpleTestCase): ) def test_no_log_when_variable_exists(self): - with self.assertRaisesMessage(AssertionError, 'no logs'): - with self.assertLogs('django.template', self.loglevel): - Variable('article.section').resolve({'article': {'section': 'News'}}) + with self.assertNoLogs('django.template', self.loglevel): + Variable('article.section').resolve({'article': {'section': 'News'}}) |