1
0
mirror of https://github.com/django/django.git synced 2025-10-31 09:41:08 +00:00

Fixed #26315 -- Allowed call_command() to accept a Command object as the first argument.

This commit is contained in:
Jon Dufresne
2016-03-02 17:12:56 -08:00
committed by Tim Graham
parent 8d3fcfa39e
commit 4115288b4f
5 changed files with 56 additions and 35 deletions

View File

@@ -342,8 +342,8 @@ class CreatesuperuserManagementCommandTestCase(TestCase):
"""
sentinel = object()
command = createsuperuser.Command()
command.check = lambda: []
command.execute(
call_command(
command,
stdin=sentinel,
stdout=six.StringIO(),
stderr=six.StringIO(),
@@ -355,8 +355,8 @@ class CreatesuperuserManagementCommandTestCase(TestCase):
self.assertIs(command.stdin, sentinel)
command = createsuperuser.Command()
command.check = lambda: []
command.execute(
call_command(
command,
stdout=six.StringIO(),
stderr=six.StringIO(),
interactive=False,