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:
Tim Graham 2015-08-26 15:47:41 -04:00
parent 2bb1027d6b
commit 01b2b0b654
4 changed files with 14 additions and 12 deletions

View file

@ -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])