diff --git a/tests/domain/epc/test_main_heating_system_overlay.py b/tests/domain/epc/test_main_heating_system_overlay.py index 7e322181e..3e2fe9317 100644 --- a/tests/domain/epc/test_main_heating_system_overlay.py +++ b/tests/domain/epc/test_main_heating_system_overlay.py @@ -504,3 +504,21 @@ def test_community_boilers_decode_to_the_heat_network_boiler_code() -> None: assert simulation is not None assert simulation.heating is not None assert simulation.heating.sap_main_heating_code == 301 + + +def test_community_boilers_drag_heat_network_category_and_a_community_gas_fuel() -> None: + # A community boiler scheme is SAP main_heating_category 6 (heat network), so + # the calculator treats it as a heat network (cert_to_inputs `_is_heat_network` + # checks code OR category 6). Its natural fuel is mains gas (community) — RdSAP + # main_fuel code 20, the dominant fuel real community-boiler certs lodge. A + # specific main_fuel override (e.g. biomass community) still wins (ADR-0041). + + # Act + simulation = main_heating_overlay_for("Community heating, boilers", 0) + + # Assert + assert simulation is not None + assert simulation.heating is not None + heating = simulation.heating + assert heating.main_heating_category == 6 + assert heating.main_fuel_type == 20