Coverage for docs_src / async_tests / app_a_py310 / test_main.py: 100%
9 statements
« prev ^ index » next coverage.py v7.13.3, created at 2026-02-12 18:15 +0000
« prev ^ index » next coverage.py v7.13.3, created at 2026-02-12 18:15 +0000
1import pytest 1abcd
2from httpx import ASGITransport, AsyncClient 1abcd
4from .main import app 1abcd
7@pytest.mark.anyio 1abcd
8async def test_root(): 1abcd
9 async with AsyncClient( 1efghij
10 transport=ASGITransport(app=app), base_url="http://test"
11 ) as ac:
12 response = await ac.get("/") 1efghij
13 assert response.status_code == 200 1efghij
14 assert response.json() == {"message": "Tomato"} 1efghij