Map property_type on full-SAP certs for correct heat-transmission 🟥

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
Khalim Conn-Kowlessar 2026-06-25 20:36:38 +00:00
parent cff5b061a4
commit 951bee3115

View file

@ -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)