Look for a CDN only in the addresses the map page loads, not in its CSRF token #1176

Merged
tiagoagueda merged 1 commit from fix-map-cdn-test into main 2026-10-31 15:39:52 +00:00
Owner

test_the_map_is_drawn_by_leaflet_from_this_instance asserted that "cdn" appeared nowhere in the lowercased page. The CSRF token is random text, and one CI run drew …pcdn82t… and failed.

The check now reads only the src and href attributes, which is what #898 promises: Leaflet and its stylesheet come from this instance. A real unpkg.com or CDN address is still caught (checked by hand against a page that loads both).

Locally: tests/test_company_map.py passes (45), and ruff passes.

Refs #898

🤖 Generated with Claude Code

`test_the_map_is_drawn_by_leaflet_from_this_instance` asserted that "cdn" appeared nowhere in the lowercased page. The CSRF token is random text, and one CI run drew `…pcdn82t…` and failed. The check now reads only the `src` and `href` attributes, which is what #898 promises: Leaflet and its stylesheet come from this instance. A real `unpkg.com` or CDN address is still caught (checked by hand against a page that loads both). Locally: `tests/test_company_map.py` passes (45), and ruff passes. Refs #898 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Look for a CDN only in the addresses the map page loads, not in its CSRF token
All checks were successful
CI / Unit tests and coverage (Python 3.14) (pull_request) Successful in 14m43s
CI / Checks: lint, migrations, catalogues, settings, built files (pull_request) Successful in 1m49s
CI / Database tests on PostgreSQL (pull_request) Successful in 5m1s
CI / Security audit (pull_request) Successful in 1m29s
CI / Browser tests (Chromium) (pull_request) Successful in 37m33s
6d04cb7ba1
test_the_map_is_drawn_by_leaflet_from_this_instance asserted that "cdn"
appeared nowhere in the lowercased page, and the CSRF token is random
text: one run drew "...pcdn82t..." and failed. The check now reads the
src and href attributes alone, which is what #898 promises: Leaflet and
its stylesheet come from this instance.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
tiagoagueda deleted branch fix-map-cdn-test 2026-10-31 15:39:52 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
Postulo/postulo!1176
No description provided.