📅  最后修改于: 2022-03-11 14:47:07.509000             🧑  作者: Mango
import pytest
@pytest.mark.asyncio
async def test_middleware2():
from async_asgi_testclient import TestClient
async with TestClient(app) as client:
response = await client.get("/")
assert "X-Process-Time" in response.headers