diff --git a/tests/domain/epc/test_main_heating_system_overlay.py b/tests/domain/epc/test_main_heating_system_overlay.py index 458311723..7e322181e 100644 --- a/tests/domain/epc/test_main_heating_system_overlay.py +++ b/tests/domain/epc/test_main_heating_system_overlay.py @@ -488,3 +488,19 @@ def test_air_source_heat_pump_drags_its_coherent_companions() -> None: assert heating.main_heating_category == 4 assert heating.main_fuel_type == 29 assert heating.meter_type == "Single" + + +def test_community_boilers_decode_to_the_heat_network_boiler_code() -> None: + # A community/heat-network scheme driven by boilers is SAP Table 4a code 301 + # (the calculator derives the heat-source efficiency + DLF from it). It must + # decode to 301, not the Gas CPSU (120) the under-populated taxonomy forced — + # a single-dwelling gas wet boiler is the wrong picture for a heat network + # (ADR-0041). A generic "Community heating" with no named source stays None. + + # Act + simulation = main_heating_overlay_for("Community heating, boilers", 0) + + # Assert — SAP Table 4a code 301 (boiler-driven community heating). + assert simulation is not None + assert simulation.heating is not None + assert simulation.heating.sap_main_heating_code == 301