summaryrefslogtreecommitdiff
path: root/tests/admin_scripts/tests.py
diff options
context:
space:
mode:
authorRyan Hiebert <ryan@ryanhiebert.com>2015-04-30 10:54:45 -0500
committerTim Graham <timograham@gmail.com>2015-09-07 19:54:32 -0400
commit617eff41acc583a3b0f97bb6bcc7efe096dc4891 (patch)
tree8422b047fd36f1318944a6ea32066da1463e8d5b /tests/admin_scripts/tests.py
parent1743efbe62968e6bbdb183e9508e7370e61f43cb (diff)
downloaddjango-617eff41acc583a3b0f97bb6bcc7efe096dc4891.tar.gz
Fixed #24857 -- Added "python -m django" entry point.
Diffstat (limited to 'tests/admin_scripts/tests.py')
-rw-r--r--tests/admin_scripts/tests.py9
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)