fix(mock-data): Fake-Daten bei leerer DB entfernt — ISMS 0%, Dashboard keine simulierten Trends, Compliance-Hub keine Fallback-Zahlen
Some checks failed
CI / go-lint (push) Has been skipped
CI / python-lint (push) Has been skipped
CI / nodejs-lint (push) Has been skipped
CI / test-go-ai-compliance (push) Failing after 29s
CI / test-python-backend-compliance (push) Successful in 33s
CI / test-python-document-crawler (push) Successful in 22s
CI / test-python-dsms-gateway (push) Successful in 17s
Some checks failed
CI / go-lint (push) Has been skipped
CI / python-lint (push) Has been skipped
CI / nodejs-lint (push) Has been skipped
CI / test-go-ai-compliance (push) Failing after 29s
CI / test-python-backend-compliance (push) Successful in 33s
CI / test-python-document-crawler (push) Successful in 22s
CI / test-python-dsms-gateway (push) Successful in 17s
- ISMS Overview: 14% → 0% bei leerer DB, "not_started" Status, alle Kapitel 0% - Dashboard: 12-Monate simulierte Trend-Historie entfernt - Compliance-Hub: Hardcoded Fallback-Statistiken (474/180/95/120/79/44/558/19) → 0 - SQLAlchemy Bug: `is not None` → `.isnot(None)` in SoA-Query - Hardcoded chapter_7/8_status="pass" → berechnet aus Findings Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -821,14 +821,18 @@ class TestOverviewDashboard:
|
||||
"""Tests for the ISO 27001 overview endpoint."""
|
||||
|
||||
def test_overview_empty_isms(self):
|
||||
"""GET /isms/overview on empty DB should return not_ready."""
|
||||
"""GET /isms/overview on empty DB should return not_started with 0% readiness."""
|
||||
r = client.get("/isms/overview")
|
||||
assert r.status_code == 200
|
||||
body = r.json()
|
||||
assert body["overall_status"] in ("not_ready", "at_risk")
|
||||
assert body["overall_status"] == "not_started"
|
||||
assert body["certification_readiness"] == 0.0
|
||||
assert body["scope_approved"] is False
|
||||
assert body["open_major_findings"] == 0
|
||||
assert body["policies_count"] == 0
|
||||
# All chapters should show 0% on empty DB
|
||||
for ch in body["chapters"]:
|
||||
assert ch["completion_percentage"] == 0.0, f"Chapter {ch['chapter']} should be 0% on empty DB"
|
||||
|
||||
def test_overview_with_data(self):
|
||||
"""GET /isms/overview should reflect created data."""
|
||||
|
||||
Reference in New Issue
Block a user