From b5ef41ea62c242a56d90b682f9d4cd51e8f764d3 Mon Sep 17 00:00:00 2001 From: Jun-te Kim Date: Fri, 19 Jun 2026 14:04:33 +0000 Subject: [PATCH] =?UTF-8?q?Remap=20the=20EPC=20hot-water=20arrangement=20f?= =?UTF-8?q?rom=20a=20landlord=20override=20=F0=9F=9F=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Opus 4.8 (1M context) --- tests/domain/epc/test_water_heating_overlay.py | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/tests/domain/epc/test_water_heating_overlay.py b/tests/domain/epc/test_water_heating_overlay.py index 49cfffbf2..7dd8c2d0a 100644 --- a/tests/domain/epc/test_water_heating_overlay.py +++ b/tests/domain/epc/test_water_heating_overlay.py @@ -11,6 +11,10 @@ import pytest from domain.epc.property_overlays.water_heating_overlay import ( water_heating_overlay_for, ) +from domain.modelling.scoring.overlay_applicator import apply_simulations +from tests.domain.sap10_calculator.worksheet._elmhurst_worksheet_000490 import ( + build_epc, +) def test_from_main_system_mains_gas_overlays_water_heating() -> None: @@ -53,3 +57,17 @@ def test_unresolvable_water_heating_produces_no_overlay( # Assert assert simulation is None + + +def test_water_heating_override_remaps_the_hot_water_arrangement() -> None: + # Arrange — landlord correction: HW is a separate electric immersion. + baseline = build_epc() + overlay = water_heating_overlay_for("Electric immersion, electricity", 0) + assert overlay is not None + + # Act + result = apply_simulations(baseline, [overlay]) + + # Assert — the calculator reads these off sap_heating. + assert result.sap_heating.water_heating_code == 903 + assert result.sap_heating.water_heating_fuel == 29