From b404747f8d22f05bfa3f4a11d808841a97d08ef1 Mon Sep 17 00:00:00 2001 From: PTah Date: Wed, 27 May 2026 13:21:02 +1000 Subject: [PATCH] test: version constants without DB import --- backend/tests/test_health.py | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/backend/tests/test_health.py b/backend/tests/test_health.py index 254c099..c1a4043 100644 --- a/backend/tests/test_health.py +++ b/backend/tests/test_health.py @@ -1,14 +1,9 @@ -"""Health endpoint smoke tests.""" +"""Version and health contract smoke tests (no DB required).""" -from unittest.mock import MagicMock - -from app.api.v1.health import build_health_payload -from app.version import APP_NAME, APP_VERSION +from app.version import APP_NAME, APP_VERSION, APP_VERSION_LABEL -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" +def test_version_constants(): + assert APP_VERSION == "0.2.0" + assert APP_NAME == "Security Alert Center" + assert APP_VERSION_LABEL == "Security Alert Center v.0.2.0"