|
from typing import AsyncIterable
|
|
|
|
from pytest import fixture
|
|
from quart import Quart
|
|
from quart.testing import QuartClient
|
|
|
|
from app import create_app
|
|
|
|
|
|
@fixture
|
|
async def app() -> AsyncIterable[Quart]:
|
|
app = create_app()
|
|
await app.startup()
|
|
yield app
|
|
await app.shutdown()
|
|
|
|
|
|
@fixture
|
|
async def client(app: Quart) -> QuartClient:
|
|
return app.test_client()
|