mirror of
https://github.com/Hestia-Homes/Model.git
synced 2026-06-08 11:17:27 +00:00
map remaining Elmhurst fields to EpcPropertyData 🟩
This commit is contained in:
parent
20ef8cd489
commit
b36c8b884c
2 changed files with 18 additions and 0 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
)
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue