diff --git a/datatypes/epc/domain/tests/test_from_sap_schema.py b/datatypes/epc/domain/tests/test_from_sap_schema.py index dd8f021dd..5eb64a6ab 100644 --- a/datatypes/epc/domain/tests/test_from_sap_schema.py +++ b/datatypes/epc/domain/tests/test_from_sap_schema.py @@ -95,6 +95,17 @@ class TestFromSapSchema17_1RebaselineFields: assert result.sap_version == 9.92 + def test_maps_property_type_as_gov_code_string(self) -> None: + # property_type feeds the calculator (heat_transmission `_is_house` / + # `_is_flat_or_maisonette` drive party-wall + heat-loss handling). Left + # None, the dwelling is classified as neither → degraded SAP. The fixture + # is a flat (gov code 2); mapped as a string like from_rdsap_schema_17_1. + schema = from_dict(SapSchema17_1, load("sap_17_1.json")) + + result = EpcPropertyDataMapper.from_sap_schema_17_1(schema) + + assert result.property_type == "2" + class TestFullSapHasHotWaterCylinderFallback: """Some full-SAP certs (e.g. SAP-Schema-17.0 cert 8265-7433-3220-9736-7902)