When passing the long option name to call_command, the available option key is the option dest name (#22985).
(self)
| 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 | """ |