summaryrefslogtreecommitdiff
path: root/tests/middleware_exceptions
diff options
context:
space:
mode:
authorMariusz Felisiak <felisiak.mariusz@gmail.com>2020-03-11 12:25:00 +0100
committerMariusz Felisiak <felisiak.mariusz@gmail.com>2020-03-12 07:37:14 +0100
commit7d8cdad6b704051bb69a47721913701349463ead (patch)
tree72e9d3f12c8960a028f9056e3486f3da212602f1 /tests/middleware_exceptions
parent35c7fe8334621fe5f9f6e96e46cea369e620cae0 (diff)
downloaddjango-7d8cdad6b704051bb69a47721913701349463ead.tar.gz
Fixed MiddlewareNotUsedTests.test_do_not_log_when_debug_is_false().
This test didn't test anything without a middleware that raises an exception.
Diffstat (limited to 'tests/middleware_exceptions')
-rw-r--r--tests/middleware_exceptions/tests.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/tests/middleware_exceptions/tests.py b/tests/middleware_exceptions/tests.py
index bd8794ded3..3e614ae0de 100644
--- a/tests/middleware_exceptions/tests.py
+++ b/tests/middleware_exceptions/tests.py
@@ -172,7 +172,10 @@ class MiddlewareNotUsedTests(SimpleTestCase):
"MiddlewareNotUsed('middleware_exceptions.tests.MyMiddlewareWithExceptionMessage'): spam eggs"
)
- @override_settings(DEBUG=False)
+ @override_settings(
+ DEBUG=False,
+ MIDDLEWARE=['middleware_exceptions.tests.MyMiddleware'],
+ )
def test_do_not_log_when_debug_is_false(self):
with self.assertRaisesMessage(AssertionError, 'no logs'):
with self.assertLogs('django.request', 'DEBUG'):