Coverage for docs_src / app_testing / app_a_py310 / test_main.py: 100%

7 statements  

« prev     ^ index     » next       coverage.py v7.13.3, created at 2026-02-12 18:15 +0000

1from fastapi.testclient import TestClient 1abcd

2 

3from .main import app 1abcd

4 

5client = TestClient(app) 1abcd

6 

7 

8def test_read_main(): 1abcd

9 response = client.get("/") 1efghij

10 assert response.status_code == 200 1efghij

11 assert response.json() == {"msg": "Hello World"} 1efghij