diff --git a/tests/domain/epc/test_main_heating_system_overlay.py b/tests/domain/epc/test_main_heating_system_overlay.py index b42effd9b..795a9defe 100644 --- a/tests/domain/epc/test_main_heating_system_overlay.py +++ b/tests/domain/epc/test_main_heating_system_overlay.py @@ -95,17 +95,34 @@ def test_electric_room_heaters_overlay_the_room_heater_charge_control() -> None: def test_overlay_logs_when_it_cannot_complete_a_companion_set( caplog: pytest.LogCaptureFixture, ) -> None: - # An archetype the overlay cannot yet fully companion — here an air-source - # heat pump, whose Table 4e Group 2 conservative control is not yet mapped — + # An archetype the overlay cannot yet fully companion — here community + # heating, whose Table 4e Group 3 conservative control is not yet mapped — # is still overlaid (log-and-continue), but the incomplete companion set is # logged as an error so the known gap is visible (CloudWatch) rather than # silently inheriting the replaced system's stale value. # Act with caplog.at_level(logging.ERROR): - main_heating_overlay_for("Air source heat pump", 0) + main_heating_overlay_for("Community heating, boilers", 0) # Assert — the gap is reported and names the archetype. - assert "Air source heat pump" in caplog.text + assert "Community heating, boilers" in caplog.text + + +def test_air_source_heat_pump_drags_the_conservative_group_2_control() -> None: + # The landlord names the system, not its control, so the overlay assumes + # the conservative Table 4e Group 2 default: 2201 ("no time or thermostatic + # control", +0.3 C — the largest Group 2 adjustment, so an unobserved + # control is never over-credited; the heat-pump mirror of storage 2401 / + # boiler 2101). Deliberately NOT the ASHP Measure's 2210 zone control — + # a measure designs a modern end-state (ADR-0024); an override describes an + # existing pump (ADR-0053). + # Act + simulation = main_heating_overlay_for("Air source heat pump", 0) + + # Assert — SAP Table 4e Group 2 conservative heat-pump control. + assert simulation is not None + assert simulation.heating is not None + assert simulation.heating.main_heating_control == 2201 def test_complete_room_heater_overlay_does_not_log_a_companion_gap(