c657a65970
Centralize APP_VERSION 0.2.0; /health and /healthz return version; startup log line; UI title Security Alert Center v.0.2.0; SSE /api/v1/stream/events for live dashboard counters.
15 lines
399 B
Python
15 lines
399 B
Python
"""Health endpoint smoke tests."""
|
|
|
|
from unittest.mock import MagicMock
|
|
|
|
from app.api.v1.health import build_health_payload
|
|
from app.version import APP_NAME, APP_VERSION
|
|
|
|
|
|
def test_health_payload_includes_version():
|
|
db = MagicMock()
|
|
payload = build_health_payload(db)
|
|
assert payload["version"] == APP_VERSION
|
|
assert payload["name"] == APP_NAME
|
|
assert payload["database"] == "ok"
|