mirror of
https://github.com/django/django.git
synced 2025-08-30 15:27:40 +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:
parent
2bb1027d6b
commit
01b2b0b654
4 changed files with 14 additions and 12 deletions
|
@ -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])
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue