diff --git a/tests/domain/epc/test_main_heating_system_overlay.py b/tests/domain/epc/test_main_heating_system_overlay.py index 5c1b680d2..45ecc9ecf 100644 --- a/tests/domain/epc/test_main_heating_system_overlay.py +++ b/tests/domain/epc/test_main_heating_system_overlay.py @@ -434,14 +434,27 @@ def test_storage_heaters_drag_along_conservative_manual_charge_control( assert simulation.heating.main_heating_category == 7 -def test_direct_acting_electric_does_not_drag_along_a_control() -> None: - # Charge control is a storage concept and full boiler controls are a wet- - # system concept; direct-acting electric panel heaters take neither, so the - # overlay leaves the control untouched. - simulation = main_heating_overlay_for("Direct-acting electric", 0) +@pytest.mark.parametrize( + "main_heating_value", + ["Direct-acting electric", "Electric boiler", "Electric CPSU"], +) +def test_electric_boiler_overlays_the_boiler_category( + main_heating_value: str, +) -> None: + # A system-replacing override must stamp the boiler heating category (SAP + # Table 4a Category 2 — codes 191/192 are wet electric boilers). Leaving it + # unset inherits the replaced system's: on portfolio 796, 30 of the first + # 40 live 191/192 overrides carried an inherited category — 6 (community) + # or 4 (heat pump) suppressed the HHRSH pathway entirely, and 7 (storage) + # made the Table 12a resolver bill direct-acting heat 100% at the off-peak + # low rate (ADR-0052, #1444). + # Act + simulation = main_heating_overlay_for(main_heating_value, 0) + + # Assert — SAP Table 4a Category 2 (boiler system). assert simulation is not None assert simulation.heating is not None - assert simulation.heating.main_heating_control is None + assert simulation.heating.main_heating_category == 2 @pytest.mark.parametrize(