mirror of
https://github.com/django/django.git
synced 2025-07-24 13:44:32 +00:00
Fixed #29560 -- Added --force-color management command option.
This commit is contained in:
parent
de8eb07c7a
commit
5195b99e2c
6 changed files with 103 additions and 47 deletions
|
@ -179,18 +179,18 @@ class CommandTests(SimpleTestCase):
|
|||
def test_call_command_unrecognized_option(self):
|
||||
msg = (
|
||||
'Unknown option(s) for dance command: unrecognized. Valid options '
|
||||
'are: example, help, integer, no_color, opt_3, option3, '
|
||||
'pythonpath, settings, skip_checks, stderr, stdout, style, '
|
||||
'traceback, verbosity, version.'
|
||||
'are: example, force_color, help, integer, no_color, opt_3, '
|
||||
'option3, pythonpath, settings, skip_checks, stderr, stdout, '
|
||||
'style, traceback, verbosity, version.'
|
||||
)
|
||||
with self.assertRaisesMessage(TypeError, msg):
|
||||
management.call_command('dance', unrecognized=1)
|
||||
|
||||
msg = (
|
||||
'Unknown option(s) for dance command: unrecognized, unrecognized2. '
|
||||
'Valid options are: example, help, integer, no_color, opt_3, '
|
||||
'option3, pythonpath, settings, skip_checks, stderr, stdout, '
|
||||
'style, traceback, verbosity, version.'
|
||||
'Valid options are: example, force_color, help, integer, no_color, '
|
||||
'opt_3, option3, pythonpath, settings, skip_checks, stderr, '
|
||||
'stdout, style, traceback, verbosity, version.'
|
||||
)
|
||||
with self.assertRaisesMessage(TypeError, msg):
|
||||
management.call_command('dance', unrecognized=1, unrecognized2=1)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue