From 2b0cb180bf276e7feb322444af54ed0c7ef63a1f Mon Sep 17 00:00:00 2001 From: Jun-te Kim Date: Tue, 23 Jun 2026 13:21:31 +0000 Subject: [PATCH] update air permebility --- datatypes/epc/domain/tests/test_from_sap_schema.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/datatypes/epc/domain/tests/test_from_sap_schema.py b/datatypes/epc/domain/tests/test_from_sap_schema.py index d8d23fec..d1bf36ed 100644 --- a/datatypes/epc/domain/tests/test_from_sap_schema.py +++ b/datatypes/epc/domain/tests/test_from_sap_schema.py @@ -324,7 +324,7 @@ class TestFromSapSchema17_1CodeBasedHeating: class TestFromSapSchema17_1Ventilation: - """Slice D5-vent: full-SAP sap_ventilation → measured air permeability (AP4), + """Slice D5-vent: full-SAP sap_ventilation → measured air permeability (AP50), ventilation_type → MechanicalVentilationKind, sheltered sides, wet rooms and the MEV PCDB index.""" @@ -333,9 +333,13 @@ class TestFromSapSchema17_1Ventilation: schema = from_dict(SapSchema17_1, load("sap_17_1.json")) return EpcPropertyDataMapper.from_sap_schema_17_1(schema) - def test_measured_air_permeability_fed_as_ap4(self, sample: EpcPropertyData) -> None: + def test_measured_air_permeability_fed_as_ap50(self, sample: EpcPropertyData) -> None: + # The lodged `air_permeability` is a q50 Blower-Door result, so it feeds the + # engine's AP50 path `(18) = AP50/20 + (8)` — NOT the AP4/Pulse formula + # `0.263 × AP4^0.924` (the air-permeability AP50 fix, uprn_10093116528). assert sample.sap_ventilation is not None - assert sample.sap_ventilation.air_permeability_ap4_m3_h_m2 == 2.6 + assert sample.sap_ventilation.air_permeability_ap50_m3_h_m2 == 2.6 + assert sample.sap_ventilation.air_permeability_ap4_m3_h_m2 is None def test_ventilation_type_6_is_extract(self, sample: EpcPropertyData) -> None: # ventilation_type 6 = MEV decentralised → EXTRACT_OR_PIV_OUTSIDE.