Files
ewoooc/tests/test_webcrumbs_asset_proxy.py
ogt 8240b59b84
All checks were successful
CD Pipeline / deploy (push) Successful in 1m4s
fix: add webcrumbs loader fallback
2026-06-24 21:26:10 +08:00

12 lines
468 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