From 0192dd8efd0d35b9d7e8fe822ea3892c0b909568 Mon Sep 17 00:00:00 2001 From: Daniel Roth Date: Wed, 1 Jul 2026 09:41:09 +0000 Subject: [PATCH] =?UTF-8?q?HHRSH=20not=20offered=20to=20solid-biomass=20dw?= =?UTF-8?q?elling=20with=20mains=5Fgas=3DTrue=20despite=20off-gas=20heatin?= =?UTF-8?q?g=20fuel=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 | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/tests/domain/modelling/test_heating_recommendation.py b/tests/domain/modelling/test_heating_recommendation.py index 4f1a321a6..fcae48860 100644 --- a/tests/domain/modelling/test_heating_recommendation.py +++ b/tests/domain/modelling/test_heating_recommendation.py @@ -119,6 +119,26 @@ def test_existing_heat_pump_dwelling_yields_no_hhr_storage_bundle() -> None: assert recommend_heating(baseline, _StubProducts()) is None +def test_solid_biomass_dwelling_with_gas_connection_yields_hhr_storage_bundle() -> None: + # Arrange — wood-pellet heating (fuel 29, SAP code 691, category 10) with + # mains_gas=True. The mains_gas flag means gas is available at the street, + # not that the heating fuel is gas (property 742121 regression). + baseline: EpcPropertyData = _electric_storage_baseline() + main = baseline.sap_heating.main_heating_details[0] + main.main_fuel_type = 29 # wood pellets (bagged) + main.sap_main_heating_code = 691 # solid-fuel room heater + main.main_heating_category = 10 # room heaters — not heat pump (category 4) + baseline.sap_energy_source.mains_gas = True # gas available at street + + # Act + recommendation: Recommendation | None = recommend_heating(baseline, _StubProducts()) + + # Assert — HHRSH is offered: off-gas-heated dwelling despite gas connection + assert recommendation is not None + options = {o.measure_type.value: o for o in recommendation.options} + assert "high_heat_retention_storage_heaters" in options + + def test_hhr_storage_bundle_carries_the_product_cost_and_contingency() -> None: # Arrange baseline: EpcPropertyData = _electric_storage_baseline()