summaryrefslogtreecommitdiff
path: root/tests/admin_scripts
diff options
context:
space:
mode:
authorClaude Paroz <claude@2xlibre.net>2015-04-03 11:26:20 +0200
committerClaude Paroz <claude@2xlibre.net>2015-04-04 10:46:29 +0200
commit426b63ba04521b8eaffb129b7e4feca36eed8777 (patch)
treeb4b842ee0c72de71458353370376aff5764937a0 /tests/admin_scripts
parent1119063c69eb4fc091c212e59462f3ec3d5676a4 (diff)
Fixed #24571 -- Restored testserver positional arguments parsing
Thanks Domas Lapinskas for the report and Tim Graham for the review.
Diffstat (limited to 'tests/admin_scripts')
-rw-r--r--tests/admin_scripts/tests.py15
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/admin_scripts/tests.py b/tests/admin_scripts/tests.py
index e5c49f0144..fbf28ad4f2 100644
--- a/tests/admin_scripts/tests.py
+++ b/tests/admin_scripts/tests.py
@@ -1315,6 +1315,21 @@ class ManageRunserverEmptyAllowedHosts(AdminScriptTestCase):
self.assertOutput(err, 'CommandError: You must set settings.ALLOWED_HOSTS if DEBUG is False.')
+class ManageTestserver(AdminScriptTestCase):
+ from django.core.management.commands.testserver import Command as TestserverCommand
+
+ @mock.patch.object(TestserverCommand, 'handle')
+ def test_testserver_handle_params(self, mock_handle):
+ out = StringIO()
+ call_command('testserver', 'blah.json', stdout=out)
+ mock_handle.assert_called_with(
+ 'blah.json',
+ stdout=out, settings=None, pythonpath=None, verbosity=1,
+ traceback=False, addrport='', no_color=False, use_ipv6=False,
+ skip_checks=True, interactive=True,
+ )
+
+
##########################################################################
# COMMAND PROCESSING TESTS
# Check that user-space commands are correctly handled - in particular,