diff --git a/tests/domain/scenario_export/test_scenario_sheet.py b/tests/domain/scenario_export/test_scenario_sheet.py index eaa2190ce..e21e633a2 100644 --- a/tests/domain/scenario_export/test_scenario_sheet.py +++ b/tests/domain/scenario_export/test_scenario_sheet.py @@ -126,3 +126,19 @@ def test_savings_and_sap_points_are_summed_across_a_propertys_measures() -> None assert row["co2_equivalent_savings"] == pytest.approx(1.5) assert row["kwh_savings"] == 3400.0 assert row["energy_cost_savings"] == 420.0 + + +def test_total_retrofit_cost_sums_the_per_measure_costs() -> None: + # arrange — a Property with two priced measures. + prop = _property( + measures=[ + _measure(measure_type="loft_insulation", estimated_cost=1200.0), + _measure(measure_type="cavity_wall_insulation", estimated_cost=800.0), + ] + ) + + # act + sheet = shape_scenario_sheet([prop]) + + # assert — the package total is the sum of the measure costs. + assert sheet.rows[0]["total_retrofit_cost"] == 2000.0