mirror of
https://github.com/django/django.git
synced 2025-11-03 13:23:19 +00:00
Skipped unnecessary system checks in user_commands test.
This commit is contained in:
parent
241e1e3cd7
commit
7dc8d9238a
1 changed files with 6 additions and 2 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue