Simplified call_command() calls.

This commit is contained in:
Nick Pope 2023-07-27 09:40:42 +01:00 committed by Mariusz Felisiak
parent a564f44350
commit 89c8c2e831
4 changed files with 8 additions and 10 deletions

View file

@ -351,7 +351,8 @@ class CommandTests(SimpleTestCase):
management.call_command(
command,
*args,
**{**kwargs, "stdout": out},
**kwargs,
stdout=out,
)
self.assertIn("foo_list=[1, 2]", out.getvalue())
@ -378,7 +379,7 @@ class CommandTests(SimpleTestCase):
)
self.assertIn(expected_output, out.getvalue())
out.truncate(0)
management.call_command("required_constant_option", **{**args, "stdout": out})
management.call_command("required_constant_option", **args, stdout=out)
self.assertIn(expected_output, out.getvalue())
def test_subparser(self):