diff options
| author | Claude Paroz <claude@2xlibre.net> | 2015-04-03 11:26:20 +0200 |
|---|---|---|
| committer | Claude Paroz <claude@2xlibre.net> | 2015-04-04 10:48:40 +0200 |
| commit | 7821f856a69b5027999890b1377aa04f24da2416 (patch) | |
| tree | 75dc4dacdc25ea7416664f73ef40fea147f47916 /tests/admin_scripts | |
| parent | 5cc0407e45393d24dee2303847902859bebda951 (diff) | |
[1.8.x] Fixed #24571 -- Restored testserver positional arguments parsing
Thanks Domas Lapinskas for the report and Tim Graham for the
review.
Backport of 426b63ba04 from master.
Diffstat (limited to 'tests/admin_scripts')
| -rw-r--r-- | tests/admin_scripts/tests.py | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/admin_scripts/tests.py b/tests/admin_scripts/tests.py index ed0958af3f..7b2617e676 100644 --- a/tests/admin_scripts/tests.py +++ b/tests/admin_scripts/tests.py @@ -1326,6 +1326,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, |
