Debian Codegraph @

docs_src/app_testing/app_a_py310/test_main.py

raw
1 from fastapi.testclient import TestClient
2
3 from .main import app
4
5 client = TestClient(app)
6
7
8 def test_read_main():
9 response = client.get("/")
10 assert response.status_code == 200
11 assert response.json() == {"msg": "Hello World"}