File size: 804 Bytes
807bd1a
 
2f12cd3
807bd1a
1d46957
2f12cd3
807bd1a
 
 
 
 
2f12cd3
807bd1a
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
from pathlib import Path
ROOT=Path(__file__).resolve().parents[1]

def test_version_current():
    assert (ROOT/"VERSION").read_text(encoding="utf-8").strip()=="4.6.15"

def test_quality_confidence_is_now_native_api_metric():
    text=(ROOT/"routes"/"data_health.py").read_text(encoding="utf-8")
    assert "confidence_score" in text
    assert "完整度衡量字段是否齐全" in text
    assert "可信度衡量这些字段是否有直接读取/接口核验证据" in text

def test_quality_ui_uses_current_health_center_not_removed_legacy_card():
    html=(ROOT/"app.html").read_text(encoding="utf-8")
    js=(ROOT/"static"/"js"/"data-health.js").read_text(encoding="utf-8")
    assert "quality-trust-card" not in html
    assert "数据质量健康中心" in js
    assert "数据可信度" in js