From 576fc948a60cde26f2a8c7d37e3bf32cc0b024ca Mon Sep 17 00:00:00 2001 From: Daniel Roth Date: Wed, 1 Jul 2026 14:17:41 +0000 Subject: [PATCH] =?UTF-8?q?Gate=20community-heated=20dwellings=20from=20AS?= =?UTF-8?q?HP=20recommendation=20=F0=9F=9F=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Sonnet 4.6 --- .../modelling/test_heating_recommendation.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) 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) ----------------------------