mirror of
https://github.com/Hestia-Homes/Model.git
synced 2026-06-30 13:10:47 +00:00
Load Ventilation from SiteNotes JSON 🟥
This commit is contained in:
parent
a169280b28
commit
4bcdb4823b
2 changed files with 38 additions and 0 deletions
|
|
@ -18,6 +18,7 @@ from datatypes.epc.surveys.pashub_rdsap_site_notes import (
|
||||||
RoofSpace,
|
RoofSpace,
|
||||||
RoofSpaceDetail,
|
RoofSpaceDetail,
|
||||||
SecondaryHeating,
|
SecondaryHeating,
|
||||||
|
Ventilation,
|
||||||
WaterHeating,
|
WaterHeating,
|
||||||
Window,
|
Window,
|
||||||
)
|
)
|
||||||
|
|
@ -294,6 +295,9 @@ class PasHubRdSapSiteNotesExtractor:
|
||||||
water_heating=self._parse_water_heating(hhw_section),
|
water_heating=self._parse_water_heating(hhw_section),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
def extract_ventilation(self) -> Ventilation:
|
||||||
|
raise NotImplementedError
|
||||||
|
|
||||||
def _parse_main_heating(self, data: List[str]) -> MainHeating:
|
def _parse_main_heating(self, data: List[str]) -> MainHeating:
|
||||||
return MainHeating(
|
return MainHeating(
|
||||||
selection_method=self._get_in(data, "How would you like to select the Heating System?") or "",
|
selection_method=self._get_in(data, "How would you like to select the Heating System?") or "",
|
||||||
|
|
|
||||||
|
|
@ -21,6 +21,7 @@ from datatypes.epc.surveys.pashub_rdsap_site_notes import (
|
||||||
RoofSpace,
|
RoofSpace,
|
||||||
RoofSpaceDetail,
|
RoofSpaceDetail,
|
||||||
SecondaryHeating,
|
SecondaryHeating,
|
||||||
|
Ventilation,
|
||||||
WaterHeating,
|
WaterHeating,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
@ -408,3 +409,36 @@ class TestHeatingAndHotWater:
|
||||||
has_thermostat=None,
|
has_thermostat=None,
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
class TestVentilation:
|
||||||
|
@pytest.fixture
|
||||||
|
def ventilation(self) -> Ventilation:
|
||||||
|
return PasHubRdSapSiteNotesExtractor(
|
||||||
|
load_text_fixture()
|
||||||
|
).extract_ventilation()
|
||||||
|
|
||||||
|
def test_ventilation_type(self, ventilation: Ventilation) -> None:
|
||||||
|
assert ventilation.ventilation_type == "Mechanical Extract - Decentralised"
|
||||||
|
|
||||||
|
def test_number_of_open_flues(self, ventilation: Ventilation) -> None:
|
||||||
|
assert ventilation.number_of_open_flues == 0
|
||||||
|
|
||||||
|
def test_ventilation_in_pcdf_database(self, ventilation: Ventilation) -> None:
|
||||||
|
assert ventilation.ventilation_in_pcdf_database is False
|
||||||
|
|
||||||
|
def test_full_ventilation(self, ventilation: Ventilation) -> None:
|
||||||
|
assert ventilation == Ventilation(
|
||||||
|
ventilation_type="Mechanical Extract - Decentralised",
|
||||||
|
has_fixed_air_conditioning=False,
|
||||||
|
number_of_open_flues=0,
|
||||||
|
number_of_closed_flues=0,
|
||||||
|
number_of_boiler_flues=0,
|
||||||
|
number_of_other_flues=0,
|
||||||
|
number_of_extract_fans=0,
|
||||||
|
number_of_passive_vents=0,
|
||||||
|
number_of_flueless_gas_fires=0,
|
||||||
|
pressure_test="No test",
|
||||||
|
draught_lobby=False,
|
||||||
|
ventilation_in_pcdf_database=False,
|
||||||
|
)
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue