diff --git a/tests/domain/epc/test_main_heating_system_overlay.py b/tests/domain/epc/test_main_heating_system_overlay.py index 7f2ebc271..d98d01458 100644 --- a/tests/domain/epc/test_main_heating_system_overlay.py +++ b/tests/domain/epc/test_main_heating_system_overlay.py @@ -524,6 +524,23 @@ def test_community_boilers_drag_heat_network_category_and_a_community_gas_fuel() assert heating.main_fuel_type == 20 +def test_community_chp_and_boilers_decode_to_their_heat_network_code() -> None: + # A community scheme with CHP + boilers is SAP Table 4a code 302, still a heat + # network (category 6) on community mains gas (20). Real audit data: 10 + # properties carry this, today mis-bucketed to Gas CPSU (ADR-0041). + + # Act + simulation = main_heating_overlay_for("Community heating, CHP and boilers", 0) + + # Assert + assert simulation is not None + assert simulation.heating is not None + heating = simulation.heating + assert heating.sap_main_heating_code == 302 + assert heating.main_heating_category == 6 + assert heating.main_fuel_type == 20 + + def test_oil_room_heater_decodes_to_the_post_2000_code() -> None: # A modern standalone oil room heater is SAP Table 4a code 623 ("Oil room # heater, 2000 or later", no boiler). It must decode to 623, not the Gas CPSU