mirror of
https://github.com/Hestia-Homes/Model.git
synced 2026-06-30 13:10:47 +00:00
Map display EnergyElements on full-SAP certs for the FE panel 🟥
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
304e8afb00
commit
4c65640e4e
1 changed files with 28 additions and 0 deletions
|
|
@ -137,6 +137,34 @@ class TestFromSapSchema17_1RebaselineFields:
|
|||
assert result.assessment_type == "SAP"
|
||||
|
||||
|
||||
class TestFromSapSchema17_1DisplayElements:
|
||||
"""Display EnergyElements the WIP mapper dropped, leaving the FE
|
||||
property-details panel "Unknown" for full-SAP certs (ADR-0037). Brings
|
||||
full-SAP to parity with from_rdsap_schema_17_1's display coverage."""
|
||||
|
||||
@pytest.fixture
|
||||
def result(self) -> EpcPropertyData:
|
||||
schema = from_dict(SapSchema17_1, load("sap_17_1.json"))
|
||||
return EpcPropertyDataMapper.from_sap_schema_17_1(schema)
|
||||
|
||||
def test_maps_main_heating_display_list(self, result: EpcPropertyData) -> None:
|
||||
assert [e.description for e in result.main_heating] == [
|
||||
"Boiler and radiators, mains gas"
|
||||
]
|
||||
|
||||
def test_maps_window_display_element(self, result: EpcPropertyData) -> None:
|
||||
assert result.window is not None
|
||||
assert result.window.description == "High performance glazing"
|
||||
|
||||
def test_maps_lighting_display_element(self, result: EpcPropertyData) -> None:
|
||||
assert result.lighting is not None
|
||||
assert result.lighting.description == "Low energy lighting in all fixed outlets"
|
||||
|
||||
def test_maps_hot_water_display_element(self, result: EpcPropertyData) -> None:
|
||||
assert result.hot_water is not None
|
||||
assert result.hot_water.description == "From main system"
|
||||
|
||||
|
||||
class TestFullSapHasHotWaterCylinderFallback:
|
||||
"""Some full-SAP certs (e.g. SAP-Schema-17.0 cert 8265-7433-3220-9736-7902)
|
||||
omit the top-level `has_hot_water_cylinder` and lodge it only under
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue