mirror of
https://github.com/Hestia-Homes/Model.git
synced 2026-07-12 13:29:04 +00:00
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:
parent
cff5b061a4
commit
951bee3115
1 changed files with 11 additions and 0 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue