Skipped unnecessary system checks in user_commands test.
This commit is contained in:
parent
241e1e3cd7
commit
7dc8d9238a
|
@ -55,8 +55,12 @@ class CommandTests(SimpleTestCase):
|
||||||
"""
|
"""
|
||||||
with self.assertRaises(CommandError):
|
with self.assertRaises(CommandError):
|
||||||
management.call_command('dance', example="raise")
|
management.call_command('dance', example="raise")
|
||||||
with captured_stderr() as stderr, self.assertRaises(SystemExit):
|
dance.Command.requires_system_checks = False
|
||||||
management.ManagementUtility(['manage.py', 'dance', '--example=raise']).execute()
|
try:
|
||||||
|
with captured_stderr() as stderr, self.assertRaises(SystemExit):
|
||||||
|
management.ManagementUtility(['manage.py', 'dance', '--example=raise']).execute()
|
||||||
|
finally:
|
||||||
|
dance.Command.requires_system_checks = True
|
||||||
self.assertIn("CommandError", stderr.getvalue())
|
self.assertIn("CommandError", stderr.getvalue())
|
||||||
|
|
||||||
def test_deactivate_locale_set(self):
|
def test_deactivate_locale_set(self):
|
||||||
|
|
Loading…
Reference in New Issue