diff --git a/tests/test_cama.py b/tests/test_cama.py index f2dc4d6..bc54887 100644 --- a/tests/test_cama.py +++ b/tests/test_cama.py @@ -30,6 +30,7 @@ PIPELINE = ROOT / "tests" / "fixtures" / "pipelines" / "hospital_cama.json" CAPTURED_ON = "2026-11-26" # the day of the capture's load: durations counted to it TRAINED_ON = "2026-11-24" # survival's follow-up ended the day the reference was trained PERIODS = [f"{y}-S{s}" for y in range(2021, 2027) for s in (1, 2)] +NEW = {"CAMA_DIAS_RESULTADO_BIOPSIA"} # tests/test_cama_biopsy_time.py CODES = { # platform code -> the current platform's **{c: f"B{c}" for c in ("0", "1", "2", "3", "4", "5", "6")}, "4A": "B4", "4B": "B4", "4C": "B4", @@ -128,8 +129,9 @@ def test_cama_from_the_hospital_to_indicators(api, platform, tmp_path): # Indicators: every measure, every semester, as the current platform answers them. reference = json.loads((REFERENCE / "indicators.json").read_text()) (measures,) = pages(api, "/cama/fhir/Measure") - assert {m["resource"]["name"] for m in measures["entry"]} == set(reference) - for measure in [e["resource"] for e in measures["entry"]]: + # A measure the current platform never had (not in its capture) is checked by its own tests. + assert {m["resource"]["name"] for m in measures["entry"]} == set(reference) | NEW + for measure in [e["resource"] for e in measures["entry"] if e["resource"]["name"] not in NEW]: params = {"measure": measure["id"], "reporting-period": ",".join(PERIODS), "event-cutoff": CAPTURED_ON} # fmt: skip found = [e for b in pages(api, "/cama/fhir/MeasureReport", params) for e in b["entry"]]