Files
ewoooc/tests/test_webcrumbs_asset_proxy.py
ogt 903cf1a27a
All checks were successful
CD Pipeline / deploy (push) Successful in 1m5s
fix: align deploy health checks with live endpoint
2026-06-25 14:45:02 +08:00

13 lines
543 B
Python

from pathlib import Path
def test_webcrumbs_loader_has_safe_fallback_response():
source = Path("routes/system_public_routes.py").read_text(encoding="utf-8")
assert "WEBCRUMBS_COMPATIBLE_LOADER_PATH = 'loader/webcrumbs-compatible-loader.js'" in source
assert "WEBCRUMBS_FALLBACK_LOADER" in source
assert "status=200, mimetype='application/javascript'" in source
assert "X-Webcrumbs-Fallback" in source
assert "upstream-unavailable" in source
assert "Loader upstream unavailable; serving local fallback" in source