Test CLI Runner ​
class flask.testing.FlaskCliRunner(app, **kwargs) ​
A CliRunner for testing a Flask app’s CLI commands. Typically created using test_cli_runner(). See Running Commands with the CLI Runner.
Parameters:
app (Flask)–kwargs (t.Any)–
invoke(
cli=None, args=None, **kwargs) ​Invokes a CLI command in an isolated environment. See
CliRunner.invokefor full method documentation. See Running Commands with the CLI Runner for examples.If the
objargument is not given, passes an instance ofScriptInfothat knows how to load theFlaskapp being tested.Parameters:
cli (Any | None)– Command object to invoke. Default is the app’s cli group.args (Any | None)– List of strings to invoke the command with.kwargs (Any)–
Returns: a
Resultobject.Return type:
Any