generated from john/python-template
Step 5 implemented
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
"""Tests for transcription.api.health."""
|
||||
|
||||
from fastapi import FastAPI
|
||||
from fastapi.testclient import TestClient
|
||||
|
||||
from transcription.api.health import router
|
||||
|
||||
|
||||
class TestHealthEndpoint:
|
||||
"""Verify /healthz endpoint behavior."""
|
||||
|
||||
def test_healthz_returns_ok_status(self):
|
||||
"""GET /healthz returns a healthy status payload."""
|
||||
app = FastAPI()
|
||||
app.include_router(router)
|
||||
client = TestClient(app)
|
||||
|
||||
response = client.get("/healthz")
|
||||
|
||||
assert response.status_code == 200
|
||||
assert response.json() == {"status": "ok"}
|
||||
Reference in New Issue
Block a user