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:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user