diff options
author | humbertotm <humberto.htm@gmail.com> | 2018-06-11 10:20:50 -0700 |
---|---|---|
committer | Tim Graham <timograham@gmail.com> | 2018-06-16 15:54:59 -0400 |
commit | e95008f2411d50929873f634c3e14ebac811fd28 (patch) | |
tree | 0b158a14a3df09b1f568dcb81ac43c0a6fed5b4b /tests/user_commands | |
parent | 11bfe3a83d79c832bd861b6b87f254197fde1659 (diff) | |
download | django-e95008f2411d50929873f634c3e14ebac811fd28.tar.gz |
Fixed #29152 -- Allowed passing kwargs to ArgumentParser initialization in management commands.
Diffstat (limited to 'tests/user_commands')
-rw-r--r-- | tests/user_commands/tests.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/user_commands/tests.py b/tests/user_commands/tests.py index e90d29bb0f..eb30065488 100644 --- a/tests/user_commands/tests.py +++ b/tests/user_commands/tests.py @@ -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): """ |