freeleaps-service-hub/apps/devops/tests/routes/test_hello_world.py

9 lines
373 B
Python

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