def test_run_app_test_client(tmpworkdir, test_client):
mktree(tmpworkdir, SIMPLE_APP)
config = Config(app_path='app.py')
app_factory = config.import_app_factory()
app = app_factory()
modify_main_app(app, config)
assert isinstance(app, aiohttp.web.Application)
cli = await test_client(app)
r = await cli.get('/')
assert r.status == 200
text = await r.text()
assert text == 'hello world'
评论列表
文章目录