From b66bb5d2cb0ed9e22a0df97f2079311849cd0681 Mon Sep 17 00:00:00 2001 From: eatyourpeas Date: Sun, 6 Oct 2024 18:32:49 +0100 Subject: [PATCH] fix the broken test --- project/npda/tests/kpi_calculations/test_kpi_calculations.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/project/npda/tests/kpi_calculations/test_kpi_calculations.py b/project/npda/tests/kpi_calculations/test_kpi_calculations.py index 39357790..a9e97e32 100644 --- a/project/npda/tests/kpi_calculations/test_kpi_calculations.py +++ b/project/npda/tests/kpi_calculations/test_kpi_calculations.py @@ -89,7 +89,11 @@ def test_kpi_calculations_dont_break_when_no_patients(AUDIT_START_DATE): ).calculate_kpis_for_patients() for kpi, results in kpi_calculations_object["calculated_kpi_values"].items(): + # remove the kpi_label key from the results + results.pop("kpi_label", None) + values = list(results.values()) + assert all( [isinstance(value, int) or isinstance(value, float) for value in values] ), f"KPI {kpi} has non-integer values: {results}"