diff --git a/datatypes/epc/domain/tests/test_from_site_notes.py b/datatypes/epc/domain/tests/test_from_site_notes.py index 717b6c4d6..8ecfa96c2 100644 --- a/datatypes/epc/domain/tests/test_from_site_notes.py +++ b/datatypes/epc/domain/tests/test_from_site_notes.py @@ -433,6 +433,23 @@ class TestCylinderInsulationTypeCoding: assert result.sap_heating is not None assert result.sap_heating.cylinder_insulation_type == 1 + def test_loose_jacket_codes_to_jacket(self) -> None: + # Arrange — "Loose jacket" → code 2 (gov-API coding; Elmhurst + # "Jacket" sibling). SAP 10.2 Table 2 Note 1 bills a loose jacket a + # separate, ~2× higher storage-loss factor than factory foam. + data = load("pashub_rdsap_site_notes_example1.json") + data["heating_and_hot_water"]["water_heating"]["insulation_type"] = ( + "Loose jacket" + ) + survey = from_dict(PasHubRdSapSiteNotes, data) + + # Act + result = EpcPropertyDataMapper.from_site_notes(survey) + + # Assert + assert result.sap_heating is not None + assert result.sap_heating.cylinder_insulation_type == 2 + def test_unknown_label_strict_raises(self) -> None: # Arrange data = load("pashub_rdsap_site_notes_example1.json")