mirror of
https://github.com/django/django.git
synced 2024-12-22 17:16:24 +00:00
Fixed MiddlewareNotUsedTests.test_do_not_log_when_debug_is_false().
This test didn't test anything without a middleware that raises an exception.
This commit is contained in:
parent
35c7fe8334
commit
7d8cdad6b7
@ -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'):
|
||||
|
Loading…
Reference in New Issue
Block a user