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.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"
|
||||
|
||||
Reference in New Issue
Block a user