mirror of
https://github.com/django/django.git
synced 2025-08-04 02:48:35 +00:00
Fixed #29152 -- Allowed passing kwargs to ArgumentParser initialization in management commands.
This commit is contained in:
parent
11bfe3a83d
commit
e95008f241
3 changed files with 21 additions and 1 deletions
|
@ -220,6 +220,12 @@ class CommandTests(SimpleTestCase):
|
|||
with self.assertRaisesMessage(CommandError, msg):
|
||||
management.call_command('subparser', 'test', 12)
|
||||
|
||||
def test_create_parser_kwargs(self):
|
||||
"""BaseCommand.create_parser() passes kwargs to CommandParser."""
|
||||
epilog = 'some epilog text'
|
||||
parser = BaseCommand().create_parser('prog_name', 'subcommand', epilog=epilog)
|
||||
self.assertEqual(parser.epilog, epilog)
|
||||
|
||||
|
||||
class CommandRunTests(AdminScriptTestCase):
|
||||
"""
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue