Engine now matches lodged 82 on a PV cert (was under-rating to 80) 🟩

Crediting the full-SAP lodged PV closes the 2-point under-rating on uprn
10023444324 — the engine now reproduces the accredited lodged value exactly.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
Khalim Conn-Kowlessar 2026-06-29 22:01:33 +00:00
parent ea7f4f4329
commit 0b8765481d

View file

@ -732,8 +732,9 @@ class TestFromSapSchema16_2:
epc = EpcPropertyDataMapper.from_api_response(load("sap_17_0.json"))
assert isinstance(epc, EpcPropertyData)
assert epc.uprn == 10023444324
# lodged 82; engine produces 80.
assert Sap10Calculator().calculate(epc).sap_score == 80
# lodged 82; the engine now also produces 82 — the cert's lodged PV is
# credited (previously dropped by the full-SAP mapper, under-rating to 80).
assert Sap10Calculator().calculate(epc).sap_score == 82
def test_18_0_0_dispatches_via_full_sap_path(self) -> None:
# SAP-Schema-18.0.0 is the full-SAP 17.1 shape; dispatched to