fix: tests health — utilise app.version au lieu de version hardcodée
This commit is contained in:
+4
-2
@@ -34,7 +34,8 @@ def test_health(client):
|
|||||||
data = resp.json()
|
data = resp.json()
|
||||||
assert "status" in data
|
assert "status" in data
|
||||||
assert data["db"] is True
|
assert data["db"] is True
|
||||||
assert data["version"] == "2.1.0"
|
from app.main import app
|
||||||
|
assert data["version"] == app.version
|
||||||
|
|
||||||
|
|
||||||
def test_dashboard(client):
|
def test_dashboard(client):
|
||||||
@@ -190,8 +191,9 @@ def test_csrf_protects_sync(client):
|
|||||||
# ── v1.0.0: Production ──
|
# ── v1.0.0: Production ──
|
||||||
|
|
||||||
def test_version_in_health(client):
|
def test_version_in_health(client):
|
||||||
|
from app.main import app
|
||||||
resp = client.get("/api/health")
|
resp = client.get("/api/health")
|
||||||
assert resp.json()["version"] == "2.1.0"
|
assert resp.json()["version"] == app.version
|
||||||
|
|
||||||
|
|
||||||
def test_db_tables_exist(client):
|
def test_db_tables_exist(client):
|
||||||
|
|||||||
Reference in New Issue
Block a user