-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Description
Summary
There are 14 skipped tests in tests/test_thing.py that need to be updated to match the current API response schema.
Problem
The tests were skipped with the message "Needs to be updated per changes made from feature files". Investigation revealed:
- Required fields changed:
CreateWellnow requiresmeasuring_point_heightandis_suitable_for_dataloggerfields - Response format changed:
current_locationis now returned as GeoJSON (LocationGeoJSONResponse) instead of flatLocationResponse - Fields removed:
well_construction_notesis no longer in the response schema
Tests to Update
POST tests (need new required fields + response updates)
test_add_water_welltest_add_water_well_with_measuring_pointtest_add_water_well_409_bad_group_idtest_add_water_well_409_bad_location_idtest_add_springtest_add_spring_409_bad_group_idtest_add_spring_409_bad_location_id
GET tests (need response schema updates)
test_get_water_wellstest_get_water_well_by_id(also covered by feature files)test_get_springstest_get_spring_by_idtest_get_thing_by_id
PATCH tests (need response schema updates)
test_patch_water_welltest_patch_spring
Required Changes
- Add
measuring_point_heightandis_suitable_for_dataloggerto well creation payloads - Update assertions to use GeoJSON format for
current_location:# Old format assert data["current_location"] == LocationResponse.model_validate(location).model_dump(mode="json") # New format (GeoJSON Feature) assert data["current_location"]["type"] == "Feature" assert data["current_location"]["geometry"]["type"] == "Point"
- Remove assertions for
well_construction_notes(no longer in response) - Update field assertions to match current
WellResponse/SpringResponseschemas
Related
- Some of these tests may overlap with BDD feature tests in
tests/features/
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels