MCPcopy
hub / github.com/django/django / test_command_style

Method test_command_style

tests/user_commands/tests.py:71–77  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

69 self.assertIn("I don't feel like dancing Rock'n'Roll.\n", out.getvalue())
70
71 def test_command_style(self):
72 out = StringIO()
73 management.call_command("dance", style="Jive", stdout=out)
74 self.assertIn("I don't feel like dancing Jive.\n", out.getvalue())
75 # Passing options as arguments also works (thanks argparse)
76 management.call_command("dance", "--style", "Jive", stdout=out)
77 self.assertIn("I don't feel like dancing Jive.\n", out.getvalue())
78
79 def test_language_preserved(self):
80 with translation.override("fr"):

Callers

nothing calls this directly

Calls 1

getvalueMethod · 0.45

Tested by

no test coverage detected