test: version constants without DB import

This commit is contained in:
PTah
2026-05-27 13:21:02 +10:00
parent c657a65970
commit b404747f8d
+6 -11
View File
@@ -1,14 +1,9 @@
"""Health endpoint smoke tests.""" """Version and health contract smoke tests (no DB required)."""
from unittest.mock import MagicMock from app.version import APP_NAME, APP_VERSION, APP_VERSION_LABEL
from app.api.v1.health import build_health_payload
from app.version import APP_NAME, APP_VERSION
def test_health_payload_includes_version(): def test_version_constants():
db = MagicMock() assert APP_VERSION == "0.2.0"
payload = build_health_payload(db) assert APP_NAME == "Security Alert Center"
assert payload["version"] == APP_VERSION assert APP_VERSION_LABEL == "Security Alert Center v.0.2.0"
assert payload["name"] == APP_NAME
assert payload["database"] == "ok"