From 5a29238480908d10d7afc9c5ebc5e6daf2da84bf Mon Sep 17 00:00:00 2001 From: Khalim Conn-Kowlessar Date: Tue, 30 Jun 2026 16:45:20 +0000 Subject: [PATCH] =?UTF-8?q?Drag=20electricity=20as=20an=20electric=20room?= =?UTF-8?q?=20heater's=20natural=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 Opus 4.8 (1M context) --- .../epc/test_main_heating_system_overlay.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/tests/domain/epc/test_main_heating_system_overlay.py b/tests/domain/epc/test_main_heating_system_overlay.py index d7c500f53..7bd0db524 100644 --- a/tests/domain/epc/test_main_heating_system_overlay.py +++ b/tests/domain/epc/test_main_heating_system_overlay.py @@ -419,3 +419,20 @@ def test_solid_fuel_room_heater_drags_its_coherent_room_heater_companions() -> N assert heating.main_heating_category == 10 assert heating.main_heating_control == 2601 assert heating.meter_type == "Single" + + +def test_electric_room_heaters_drag_their_natural_electricity_fuel() -> None: + # A landlord names the system; an electric room heater's natural fuel is + # unambiguously electricity (RdSAP main_fuel code 29). The overlay drags it so + # a system-only override is self-coherent even on a cert that lodged a + # different fuel — a later `main_fuel` override still wins (last-wins + # composition), and a contradicting fuel is logged, not silently kept + # (ADR-0041 natural-fuel coherence). + + # Act + simulation = main_heating_overlay_for("Electric room heaters", 0) + + # Assert + assert simulation is not None + assert simulation.heating is not None + assert simulation.heating.main_fuel_type == 29