MCPcopy
hub / github.com/django/django / test_call_command_option_parsing

Method test_call_command_option_parsing

tests/user_commands/tests.py:144–153  ·  view source on GitHub ↗

When passing the long option name to call_command, the available option key is the option dest name (#22985).

(self)

Source from the content-addressed store, hash-verified

142 self.assertEqual(cmds, ["eggcommand"])
143
144 def test_call_command_option_parsing(self):
145 """
146 When passing the long option name to call_command, the available option
147 key is the option dest name (#22985).
148 """
149 out = StringIO()
150 management.call_command("dance", stdout=out, opt_3=True)
151 self.assertIn("option3", out.getvalue())
152 self.assertNotIn("opt_3", out.getvalue())
153 self.assertNotIn("opt-3", out.getvalue())
154
155 def test_call_command_option_parsing_non_string_arg(self):
156 """

Callers

nothing calls this directly

Calls 1

getvalueMethod · 0.45

Tested by

no test coverage detected