diff options
author | Adam Chainz <adam@adamj.eu> | 2016-08-14 11:53:32 +0200 |
---|---|---|
committer | Tim Graham <timograham@gmail.com> | 2017-01-09 17:23:24 -0500 |
commit | 7dc8d9238aed6267d6f21e05d0f02eb8ec2007ec (patch) | |
tree | 63003d6f28b349afa75d53e45d4d9df501263d47 /tests/user_commands | |
parent | 241e1e3cd7669c5d8869ad4297b9edf6046ed7f0 (diff) | |
download | django-7dc8d9238aed6267d6f21e05d0f02eb8ec2007ec.tar.gz |
Skipped unnecessary system checks in user_commands test.
Diffstat (limited to 'tests/user_commands')
-rw-r--r-- | tests/user_commands/tests.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/tests/user_commands/tests.py b/tests/user_commands/tests.py index 8c37aed100..4e4f5dc911 100644 --- a/tests/user_commands/tests.py +++ b/tests/user_commands/tests.py @@ -55,8 +55,12 @@ class CommandTests(SimpleTestCase): """ with self.assertRaises(CommandError): management.call_command('dance', example="raise") - with captured_stderr() as stderr, self.assertRaises(SystemExit): - management.ManagementUtility(['manage.py', 'dance', '--example=raise']).execute() + dance.Command.requires_system_checks = False + 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()) def test_deactivate_locale_set(self): |