diff --git a/tests/domain/epc/test_water_heating_overlay.py b/tests/domain/epc/test_water_heating_overlay.py index 58ba813f7..f71ddcee4 100644 --- a/tests/domain/epc/test_water_heating_overlay.py +++ b/tests/domain/epc/test_water_heating_overlay.py @@ -86,6 +86,33 @@ def test_from_main_wood_logs_decodes_to_the_wood_fuel_not_house_coal() -> None: assert simulation.heating.water_heating_fuel == 6 +@pytest.mark.parametrize( + ("water_heating_value", "fuel"), + [ + # Biomass (community) — RdSAP fuel 31. Under a coherent community main + # the calculator scores DHW from the main, so this is a faithful, + # score-neutral relabel off house coal; the fuel is still emitted so an + # individual-main dwelling would score biomass, not coal (ADR-0043). + ("From main system, biomass (community)", 31), + # Dual fuel (mineral + wood) — RdSAP fuel 9. + ("From main system, dual fuel (mineral and wood)", 9), + # Biodiesel (community) — RdSAP fuel 34. + ("From main system, biodiesel (community)", 34), + ], +) +def test_biomass_family_water_heating_decodes_off_house_coal( + water_heating_value: str, fuel: int +) -> None: + # Act + simulation = water_heating_overlay_for(water_heating_value, 0) + + # Assert — from main system (901), each to its own RdSAP fuel, not coal 33. + assert simulation is not None + assert simulation.heating is not None + assert simulation.heating.water_heating_code == 901 + assert simulation.heating.water_heating_fuel == fuel + + @pytest.mark.parametrize("water_heating_value", ["Unknown", ""]) def test_unresolvable_water_heating_produces_no_overlay( water_heating_value: str,