1
0
mirror of https://github.com/django/django.git synced 2025-11-07 07:15:35 +00:00

Fixed #18387 -- Do not call sys.exit during call_command.

Moved sys.exit(1) so as failing management commands reach it
only when running from command line.
This commit is contained in:
Claude Paroz
2012-05-26 20:50:44 +02:00
parent 4423757c0c
commit f2b6763ad7
7 changed files with 56 additions and 44 deletions

View File

@@ -185,14 +185,14 @@ class FixtureLoadingTests(TestCase):
exclude_list=['fixtures.Article', 'fixtures.Book', 'sites'])
# Excluding a bogus app should throw an error
self.assertRaises(SystemExit,
self.assertRaises(management.CommandError,
self._dumpdata_assert,
['fixtures', 'sites'],
'',
exclude_list=['foo_app'])
# Excluding a bogus model should throw an error
self.assertRaises(SystemExit,
self.assertRaises(management.CommandError,
self._dumpdata_assert,
['fixtures', 'sites'],
'',