|
from typing import AsyncIterable
|
|
|
|
from fastapi import FastAPI
|
|
from fastapi.testclient import TestClient
|
|
from pytest import fixture
|
|
|
|
from app import create_app
|
|
|
|
|
|
@fixture
|
|
def app() -> FastAPI:
|
|
app = create_app()
|
|
return app
|
|
|
|
|
|
@fixture
|
|
def client(app: FastAPI) -> AsyncIterable[TestClient]:
|
|
with TestClient(app) as client:
|
|
yield client
|