Add template fastapi app, test, README.md, this can be used for future extension

This commit is contained in:
dongli 2025-05-11 19:16:00 -07:00
parent c4c34e6cd7
commit bf96f8b301
2 changed files with 9 additions and 0 deletions

View File

View File

@ -0,0 +1,9 @@
from fastapi.testclient import TestClient
from app.main import app # Adjust this import if your app is in a different location
client = TestClient(app)
def test_hello_world():
response = client.get("/api/hello_world/")
assert response.status_code == 200
assert response.json() == {"message": "Hello, World!"} # Update if your endpoint returns different data