diff --git a/tests/domain/epc/test_main_heating_system_overlay.py b/tests/domain/epc/test_main_heating_system_overlay.py index 9a329a321..41cc484a1 100644 --- a/tests/domain/epc/test_main_heating_system_overlay.py +++ b/tests/domain/epc/test_main_heating_system_overlay.py @@ -452,3 +452,18 @@ def test_solid_fuel_room_heater_defaults_to_house_coal_as_its_natural_fuel() -> assert simulation is not None assert simulation.heating is not None assert simulation.heating.main_fuel_type == 33 + + +def test_air_source_heat_pump_decodes_to_the_default_ashp_code() -> None: + # A landlord names "air source heat pump" without a PCDB model. It is + # modellable via the SAP Table 4a default ASHP code (211, "flow temp in other + # cases", default SPF 2.30) — no main_heating_index_number needed — so it must + # decode to 211, not produce no overlay / fall to Unknown (ADR-0041). + + # Act + simulation = main_heating_overlay_for("Air source heat pump", 0) + + # Assert — SAP Table 4a code 211 (default air-source heat pump). + assert simulation is not None + assert simulation.heating is not None + assert simulation.heating.sap_main_heating_code == 211