Re: `call_command` raises ValueError during testing

2022-10-03 Thread Ferran Jovell
Hi Tim, As far as I understand, when adding an argument with `argparser` without dashes, argparse interprets it as a positional argument and not an option, which is how it works when you call it from the terminal. However, calling `call_command` with args instead of keyword arguments seems to skip

Re: `call_command` raises ValueError during testing

2022-10-02 Thread Tim Graham
Hi Ferran, It looks like opt.option_strings is empty because "poll_ids" (in parser.add_argument()) isn't prefixed with a dash or double dash. You could instead use call_command() like this: call_command("closepoll", 1) But I think your invocation could be fixed (or at least not fail so obscur