Add template fastapi app, test, README.md, this can be used for future extension
This commit is contained in:
parent
c4c34e6cd7
commit
bf96f8b301
0
apps/devops/tests/routes/__init__.py
Normal file
0
apps/devops/tests/routes/__init__.py
Normal file
9
apps/devops/tests/routes/test_hello_world.py
Normal file
9
apps/devops/tests/routes/test_hello_world.py
Normal 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
|
||||
Loading…
Reference in New Issue
Block a user