Gate community-heated dwellings from ASHP recommendation 🟥

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Daniel Roth 2026-07-01 14:17:41 +00:00
parent 3d562be398
commit 576fc948a6

View file

@ -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) ----------------------------