Skip to content

test(spp_gis): assert the geofence GeoJSON core properties as a subset, not an exact set (#443) - #544

Open
gonzalesedwin1123 wants to merge 2 commits into
19.0from
fix-443-gis-geofence-props-test
Open

gonzalesedwin1123 wants to merge 2 commits into
19.0from
fix-443-gis-geofence-props-test

Conversation

@gonzalesedwin1123

Copy link
Copy Markdown
Member

Part of #443 (weekly ci-full red). Test-only; 1 test in the SP-MIS stack. Removes two assertions, with Edwin's explicit OK from the #443 research review.

Cause

TestGeofenceModel.test_to_geojson_properties_structure asserted incident_id / incident_name are absent from the GeoJSON properties ("Should NOT have incident fields in core", written in 1200973 to prove the spp_api_v2_gis → spp_gis move left the incident fields behind). spp_api_v2_gis/models/geofence.py extends _get_geojson_properties with exactly those two keys, and spp_api_v2_gis/tests/test_geofence_model.py asserts their presence. Any database with both modules fails one of the two suites; the SP-MIS stack has both.

The core contract is that spp_gis's own keys are present (the ten assertIns stay). Asserting the absence of an optional downstream extension is not a core property, so those two lines are removed; the positive assertion in spp_api_v2_gis's own test covers the extension.

Evidence

  • Stack run -i spp_gis,spp_api_v2_gis --test-tags /spp_gis:TestGeofenceModel: 0 failed, 0 error(s) of 35 tests (red in the 2026-09-20 weekly run).
  • Module suite: 0 failed, 0 error(s) of 96 tests. All pre-commit hooks pass.

spp_gis 19.0.2.1.0 → 19.0.2.1.1 + HISTORY. README/index.html left for CI's generator.

Noted, not changed

Layering: the incident properties are emitted by spp_api_v2_gis while the incident_id field is owned by spp_hazard. Tracked in the #443 research follow-ups.

…t, not an exact set

test_to_geojson_properties_structure asserted that incident_id and
incident_name are absent. spp_api_v2_gis legitimately adds both to the
same properties and asserts their presence in its own tests, so any
database carrying both modules failed one suite or the other. The core
contract is that its own keys are present; downstream extensions are
allowed.

Refs #443
@codecov

codecov Bot commented Sep 21, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 76.93%. Comparing base (1a3c591) to head (109033f).

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             19.0     #544      +/-   ##
==========================================
+ Coverage   76.91%   76.93%   +0.02%     
==========================================
  Files         704      730      +26     
  Lines       45774    47157    +1383     
==========================================
+ Hits        35205    36282    +1077     
- Misses      10569    10875     +306     
Flag Coverage Δ
spp_api_v2_change_request 73.37% <ø> (ø)
spp_api_v2_cycles 71.03% <ø> (ø)
spp_api_v2_entitlements 70.23% <ø> (ø)
spp_api_v2_gis 74.60% <ø> (ø)
spp_api_v2_programs 92.22% <ø> (ø)
spp_area_hdx 81.60% <ø> (?)
spp_base_common 91.07% <ø> (ø)
spp_case_entitlements 100.00% <ø> (ø)
spp_case_programs 100.00% <ø> (ø)
spp_cel_load_testing 98.11% <ø> (ø)
spp_change_request_v2 78.90% <ø> (ø)
spp_cr_type_assign_program 92.50% <ø> (ø)
spp_dci_demo 94.28% <ø> (ø)
spp_gis 75.93% <ø> (?)
spp_programs 67.58% <ø> (ø)
spp_registry 89.00% <ø> (ø)
spp_security 69.56% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.
see 26 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@gonzalesedwin1123
gonzalesedwin1123 marked this pull request as ready for review September 21, 2026 06:37
@gonzalesedwin1123

Copy link
Copy Markdown
Member Author

Full-stack evidence: SP-MIS ci-full dispatched on this branch (run 35566162272) vs the 2026-09-20 weekly baseline (run 35499069639).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant