(runner)
| 305 | |
| 306 | |
| 307 | def test_with_appcontext(runner): |
| 308 | @click.command() |
| 309 | @with_appcontext |
| 310 | def testcmd(): |
| 311 | click.echo(current_app.name) |
| 312 | |
| 313 | obj = ScriptInfo(create_app=lambda: Flask("testapp")) |
| 314 | |
| 315 | result = runner.invoke(testcmd, obj=obj) |
| 316 | assert result.exit_code == 0 |
| 317 | assert result.output == "testapp\n" |
| 318 | |
| 319 | |
| 320 | def test_appgroup_app_context(runner): |
nothing calls this directly
no test coverage detected