diff --git a/tests/domain/modelling/test_heating_recommendation.py b/tests/domain/modelling/test_heating_recommendation.py index bb54792ca..5a54ff812 100644 --- a/tests/domain/modelling/test_heating_recommendation.py +++ b/tests/domain/modelling/test_heating_recommendation.py @@ -336,6 +336,22 @@ def test_existing_heat_pump_yields_no_ashp_bundle() -> None: } +def test_community_heated_house_yields_no_ashp_bundle() -> None: + # Arrange — community boiler network (SAP code 301, category 6) on a house: + # topology alone must block ASHP regardless of fuel. + epc = build_epc() + main = epc.sap_heating.main_heating_details[0] + main.sap_main_heating_code = 301 + main.main_heating_category = 6 + + # Act / Assert + recommendation: Recommendation | None = recommend_heating(epc, _StubProducts()) + if recommendation is not None: + assert MeasureType.AIR_SOURCE_HEAT_PUMP not in { + o.measure_type for o in recommendation.options + } + + # --- Gas boiler upgrade (Heating/HW expansion) ----------------------------