Fixed #28524 -- Fixed program name in management commands when using 'python -m django'.

This commit is contained in:
Nick Pope 2017-08-31 14:22:25 +01:00 committed by Tim Graham
parent f0d9ede9e6
commit ec6481246a
2 changed files with 6 additions and 0 deletions

View file

@ -2223,3 +2223,7 @@ class MainModule(AdminScriptTestCase):
cmd_out, _ = self.run_django_admin(['--version'])
mod_out, _ = self.run_test('-m', ['django', '--version'])
self.assertEqual(mod_out, cmd_out)
def test_program_name_in_help(self):
out, err = self.run_test('-m', ['django', 'help'])
self.assertOutput(out, "Type 'python -m django help <subcommand>' for help on a specific subcommand.")