test: version constants without DB import
This commit is contained in:
@@ -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"
|
|
||||||
|
|||||||
Reference in New Issue
Block a user