Loading django/core/management/commands/testserver.py +0 −1 Original line number Diff line number Diff line Loading @@ -5,7 +5,6 @@ from django.db import connection class Command(BaseCommand): help = 'Runs a development server with data from the given fixture(s).' args = '[fixture ...]' requires_system_checks = False Loading docs/releases/1.8.1.txt +3 −0 Original line number Diff line number Diff line Loading @@ -11,3 +11,6 @@ Bugfixes * Added support for serializing :class:`~datetime.timedelta` objects in migrations (:ticket:`24566`). * Restored proper parsing of the :djadmin:`testserver` command's positional arguments (fixture names) (:ticket:`24571`). tests/admin_scripts/tests.py +15 −0 Original line number Diff line number Diff line Loading @@ -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 Loading
django/core/management/commands/testserver.py +0 −1 Original line number Diff line number Diff line Loading @@ -5,7 +5,6 @@ from django.db import connection class Command(BaseCommand): help = 'Runs a development server with data from the given fixture(s).' args = '[fixture ...]' requires_system_checks = False Loading
docs/releases/1.8.1.txt +3 −0 Original line number Diff line number Diff line Loading @@ -11,3 +11,6 @@ Bugfixes * Added support for serializing :class:`~datetime.timedelta` objects in migrations (:ticket:`24566`). * Restored proper parsing of the :djadmin:`testserver` command's positional arguments (fixture names) (:ticket:`24571`).
tests/admin_scripts/tests.py +15 −0 Original line number Diff line number Diff line Loading @@ -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