|
|
| 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" |
|
|