From b36c8b884c477f429a1cc3ce83312515aef0dab1 Mon Sep 17 00:00:00 2001 From: Daniel Roth Date: Fri, 24 Apr 2026 15:33:59 +0000 Subject: [PATCH] =?UTF-8?q?map=20remaining=20Elmhurst=20fields=20to=20EpcP?= =?UTF-8?q?ropertyData=20=F0=9F=9F=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../tests/test_elmhurst_end_to_end.py | 14 ++++++++++++++ datatypes/epc/domain/mapper.py | 4 ++++ 2 files changed, 18 insertions(+) diff --git a/backend/documents_parser/tests/test_elmhurst_end_to_end.py b/backend/documents_parser/tests/test_elmhurst_end_to_end.py index 8e45e24d..18742356 100644 --- a/backend/documents_parser/tests/test_elmhurst_end_to_end.py +++ b/backend/documents_parser/tests/test_elmhurst_end_to_end.py @@ -255,6 +255,9 @@ class TestHeating: def test_has_fixed_air_conditioning(self, result: EpcPropertyData) -> None: assert result.sap_heating.has_fixed_air_conditioning is False + def test_water_heating_code(self, result: EpcPropertyData) -> None: + assert result.sap_heating.water_heating_code == 901 + class TestEnergySource: def test_mains_gas(self, result: EpcPropertyData) -> None: @@ -295,3 +298,14 @@ class TestVentilation: def test_open_flues_count(self, result: EpcPropertyData) -> None: assert result.sap_ventilation is not None assert result.sap_ventilation.open_flues_count == 0 + + +class TestDraughtproofingAndWater: + def test_percent_draughtproofed(self, result: EpcPropertyData) -> None: + assert result.percent_draughtproofed == 100 + + def test_waste_water_heat_recovery_absent(self, result: EpcPropertyData) -> None: + assert result.waste_water_heat_recovery == "None" + + def test_any_unheated_rooms_false(self, result: EpcPropertyData) -> None: + assert result.any_unheated_rooms is False diff --git a/datatypes/epc/domain/mapper.py b/datatypes/epc/domain/mapper.py index 554bdda6..ab1bb0aa 100644 --- a/datatypes/epc/domain/mapper.py +++ b/datatypes/epc/domain/mapper.py @@ -264,6 +264,9 @@ class EpcPropertyDataMapper: hydro=survey.renewables.hydro_electricity_generated_kwh > 0, photovoltaic_array=survey.renewables.photovoltaic_panel != "None", sap_ventilation=_map_elmhurst_ventilation(survey.ventilation), + percent_draughtproofed=survey.draught_proofing_percent, + waste_water_heat_recovery="None" if not survey.renewables.wwhrs_present else "Present", + any_unheated_rooms=survey.heated_habitable_rooms < survey.habitable_rooms, ) @staticmethod @@ -1770,6 +1773,7 @@ def _map_elmhurst_sap_heating(survey: ElmhurstSiteNotes) -> SapHeating: has_fixed_air_conditioning=survey.ventilation.fixed_space_cooling, shower_outlets=shower_outlets, cylinder_size=None if not survey.water_heating.hot_water_cylinder_present else survey.water_heating.water_heating_code, + water_heating_code=survey.water_heating.water_heating_sap_code, )