generated from john/python-template
22 lines
569 B
Python
22 lines
569 B
Python
"""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"}
|