MCPcopy
hub / github.com/pallets/flask / test_flaskgroup_app_context

Function test_flaskgroup_app_context

tests/test_cli.py:348–362  ·  view source on GitHub ↗
(runner)

Source from the content-addressed store, hash-verified

346
347
348def test_flaskgroup_app_context(runner):
349 def create_app():
350 return Flask("flaskgroup")
351
352 @click.group(cls=FlaskGroup, create_app=create_app)
353 def cli(**params):
354 pass
355
356 @cli.command()
357 def test():
358 click.echo(current_app.name)
359
360 result = runner.invoke(cli, ["test"])
361 assert result.exit_code == 0
362 assert result.output == "flaskgroup\n"
363
364
365@pytest.mark.parametrize("set_debug_flag", (True, False))

Callers

nothing calls this directly

Calls 1

invokeMethod · 0.45

Tested by

no test coverage detected