diff options
Diffstat (limited to 'tests/admin_scripts/tests.py')
-rw-r--r-- | tests/admin_scripts/tests.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/admin_scripts/tests.py b/tests/admin_scripts/tests.py index 174cfe687f..616082346b 100644 --- a/tests/admin_scripts/tests.py +++ b/tests/admin_scripts/tests.py @@ -2037,3 +2037,12 @@ class Dumpdata(AdminScriptTestCase): out, err = self.run_manage(args) self.assertOutput(err, "You can only use --pks option with one model") self.assertNoOutput(out) + + +class MainModule(AdminScriptTestCase): + """python -m django works like django-admin.""" + + def test_runs_django_admin(self): + cmd_out, _ = self.run_django_admin(['--version']) + mod_out, _ = self.run_test('-m', ['django', '--version']) + self.assertEqual(mod_out, cmd_out) |