Harden RC7 API response contracts
This commit is contained in:
@@ -495,9 +495,25 @@ def test_dhmv_endpoints_use_canonical_envelopes(monkeypatch) -> None:
|
||||
"analyze",
|
||||
lambda *_args, **_kwargs: {
|
||||
"dataset_id": str(output_dataset_id),
|
||||
"product_key": "dtm_1m",
|
||||
"surface_model": "terrain",
|
||||
"selection_bbox": lambert_bbox_payload().bbox.model_dump(),
|
||||
"sample_count": 100,
|
||||
"summary": {"metric_value": 25.0, "metric_unit": "m TAW", "metrics": []},
|
||||
"slope_sample_count": 81,
|
||||
"coverage_ratio": 1.0,
|
||||
"resolution_m": 5.0,
|
||||
"vertical_reference": "TAW",
|
||||
"summary": {
|
||||
"metric_label": "Gemiddelde terreinhoogte",
|
||||
"metric_value": 25.0,
|
||||
"metric_unit": "m TAW",
|
||||
"aggregation_method": "mean",
|
||||
"primary_metric_key": "terrain_elevation_mean_m",
|
||||
"metrics": [],
|
||||
},
|
||||
"unsupported_metrics": ["water_depth_m", "water_volume_m3"],
|
||||
"limitation_message": "Terrain height is not water depth.",
|
||||
"generated_at": "2026-07-18T00:00:00Z",
|
||||
},
|
||||
)
|
||||
monkeypatch.setattr(
|
||||
@@ -507,7 +523,25 @@ def test_dhmv_endpoints_use_canonical_envelopes(monkeypatch) -> None:
|
||||
"dataset_id": str(output_dataset_id),
|
||||
"dataset_ids": [str(output_dataset_id)],
|
||||
"partition_count": 1,
|
||||
"product_key": "dtm_1m",
|
||||
"surface_model": "terrain",
|
||||
"selection_bbox": lambert_bbox_payload().bbox.model_dump(),
|
||||
"sample_count": 100,
|
||||
"slope_sample_count": 81,
|
||||
"coverage_ratio": 1.0,
|
||||
"resolution_m": 5.0,
|
||||
"vertical_reference": "TAW",
|
||||
"summary": {
|
||||
"metric_label": "Gemiddelde terreinhoogte",
|
||||
"metric_value": 25.0,
|
||||
"metric_unit": "m TAW",
|
||||
"aggregation_method": "mean",
|
||||
"primary_metric_key": "terrain_elevation_mean_m",
|
||||
"metrics": [],
|
||||
},
|
||||
"unsupported_metrics": ["water_depth_m", "water_volume_m3"],
|
||||
"limitation_message": "Terrain height is not water depth.",
|
||||
"generated_at": "2026-07-18T00:00:00Z",
|
||||
},
|
||||
)
|
||||
app.dependency_overrides[get_db] = lambda: db
|
||||
|
||||
Reference in New Issue
Block a user