diff --git a/tests/domain/epc/test_main_heating_system_overlay.py b/tests/domain/epc/test_main_heating_system_overlay.py index ad6944255..c477bcee2 100644 --- a/tests/domain/epc/test_main_heating_system_overlay.py +++ b/tests/domain/epc/test_main_heating_system_overlay.py @@ -150,6 +150,37 @@ def test_electric_underfloor_decodes_to_its_own_code_dragging_electricity( assert simulation.heating.main_fuel_type == 29 +@pytest.mark.parametrize( + "main_heating_value", + [ + # "off-peak only" / "off peak" positively claim off-peak. + "Electric underfloor, in concrete slab (off-peak)", + "Electric underfloor, integrated storage and direct-acting", + ], +) +def test_off_peak_underfloor_asserts_a_dual_meter(main_heating_value: str) -> None: + # Act + simulation = main_heating_overlay_for(main_heating_value, 0) + + # Assert — an off-peak underfloor must not bill overnight heat at the peak rate. + assert simulation is not None + assert simulation.heating is not None + assert simulation.heating.meter_type == "Dual" + + +def test_screed_underfloor_defers_the_meter_to_the_cert() -> None: + # "In screed above insulation (standard or off peak)" is tariff-ambiguous (81% + # of the corpus lodge off-peak), so the archetype cannot know the meter — it + # leaves meter_type unset so the cert's lodged meter stands (ADR-0046). + simulation = main_heating_overlay_for( + "Electric underfloor, in screed above insulation", 0 + ) + + assert simulation is not None + assert simulation.heating is not None + assert simulation.heating.meter_type is None + + @pytest.mark.parametrize( ("main_heating_value", "code"), [