mirror of
https://github.com/django/django.git
synced 2025-10-24 06:06:09 +00:00
Fixed #25318 -- Made SILENCED_SYSTEM_CHECKS suppress all messages.
Previously, messages of ERROR level or higher were printed to the console.
This commit is contained in:
@@ -232,14 +232,8 @@ class SilencingCheckTests(SimpleTestCase):
|
||||
call_command('check', stdout=out, stderr=err)
|
||||
except CommandError:
|
||||
self.fail("The mycheck.E001 check should be silenced.")
|
||||
self.assertEqual(out.getvalue(), '')
|
||||
self.assertEqual(
|
||||
err.getvalue(),
|
||||
'System check identified some issues:\n\n'
|
||||
'ERRORS:\n'
|
||||
'?: (myerrorcheck.E001) Error\n\n'
|
||||
'System check identified 1 issue (0 silenced).\n'
|
||||
)
|
||||
self.assertEqual(out.getvalue(), 'System check identified no issues (1 silenced).\n')
|
||||
self.assertEqual(err.getvalue(), '')
|
||||
|
||||
@override_settings(SILENCED_SYSTEM_CHECKS=['mywarningcheck.E001'])
|
||||
@override_system_checks([custom_warning_system_check])
|
||||
|
||||
Reference in New Issue
Block a user