hir-shield-vt-receipt-bridge / tests /test_runtime_version_trace.py
HirModel's picture
Upload 193 files
1dd9ae7 verified
Raw
History Blame Contribute Delete
669 Bytes
import json
import sys
from pathlib import Path
sys.path.insert(0, str(Path(__file__).resolve().parents[1]))
import app
def test_app_version_is_v0_6():
assert app.APP_VERSION == "0.6.5.1"
def test_bundled_sample_receipts_match_app_version():
receipts_dir = Path(__file__).resolve().parents[1] / "receipts"
receipt_paths = sorted(receipts_dir.glob("*.json"))
assert receipt_paths, "No bundled sample receipts found."
for path in receipt_paths:
receipt = json.loads(path.read_text(encoding="utf-8"))
assert receipt.get("bridge", {}).get("version") == app.APP_VERSION, f"{path.name} bridge.version does not match app.APP_VERSION"