mirror of
https://github.com/django/django.git
synced 2025-08-30 07:17:49 +00:00
Fixed #24571 -- Restored testserver positional arguments parsing
Thanks Domas Lapinskas for the report and Tim Graham for the review.
This commit is contained in:
parent
1119063c69
commit
426b63ba04
3 changed files with 18 additions and 1 deletions
|
@ -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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue