diff options
Diffstat (limited to 'tests/admin_scripts/tests.py')
| -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 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, |
