Coverage for tests / test_tutorial / test_testing / test_main_a.py: 100%
8 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
1from inline_snapshot import snapshot 1abcd
3from docs_src.app_testing.app_a_py310.test_main import client, test_read_main 1abcd
6def test_main(): 1abcd
7 test_read_main() 1hij
10def test_openapi_schema(): 1abcd
11 response = client.get("/openapi.json") 1efg
12 assert response.status_code == 200, response.text 1efg
13 assert response.json() == snapshot( 1efg
14 {
15 "openapi": "3.1.0",
16 "info": {"title": "FastAPI", "version": "0.1.0"},
17 "paths": {
18 "/": {
19 "get": {
20 "responses": {
21 "200": {
22 "description": "Successful Response",
23 "content": {"application/json": {"schema": {}}},
24 }
25 },
26 "summary": "Read Main",
27 "operationId": "read_main__get",
28 }
29 }
30 },
31 }
32 )