mirror of
https://github.com/Hestia-Homes/Model.git
synced 2026-06-08 11:17:27 +00:00
Map misc top-level properties 🟥
This commit is contained in:
parent
bf31a35e6d
commit
542034280e
1 changed files with 37 additions and 0 deletions
|
|
@ -632,3 +632,40 @@ class TestFromSiteNotesHeatingBoiler:
|
|||
def test_central_heating_pump_age_str(self, result: EpcPropertyData) -> None:
|
||||
# heating_and_hot_water.main_heating.central_heating_pump_age: "Unknown"
|
||||
assert result.sap_heating.main_heating_details[0].central_heating_pump_age_str == "Unknown"
|
||||
|
||||
|
||||
class TestFromSiteNotesMiscTopLevel:
|
||||
"""
|
||||
Fixture: pashub_rdsap_site_notes_example1.json
|
||||
Misc fields: 2 storeys, unheated rooms present, no hydro, no PV array, no WWHR.
|
||||
"""
|
||||
|
||||
@pytest.fixture
|
||||
def survey(self) -> PasHubRdSapSiteNotes:
|
||||
return from_dict(
|
||||
PasHubRdSapSiteNotes, load("pashub_rdsap_site_notes_example1.json")
|
||||
)
|
||||
|
||||
@pytest.fixture
|
||||
def result(self, survey: PasHubRdSapSiteNotes) -> EpcPropertyData:
|
||||
return EpcPropertyDataMapper.from_site_notes(survey)
|
||||
|
||||
def test_number_of_storeys(self, result: EpcPropertyData) -> None:
|
||||
# general.number_of_storeys: 2
|
||||
assert result.number_of_storeys == 2
|
||||
|
||||
def test_any_unheated_rooms(self, result: EpcPropertyData) -> None:
|
||||
# room_count_elements.any_unheated_rooms: true
|
||||
assert result.any_unheated_rooms is True
|
||||
|
||||
def test_waste_water_heat_recovery(self, result: EpcPropertyData) -> None:
|
||||
# room_count_elements.waste_water_heat_recovery: "None"
|
||||
assert result.waste_water_heat_recovery == "None"
|
||||
|
||||
def test_hydro(self, result: EpcPropertyData) -> None:
|
||||
# renewables.hydro: false
|
||||
assert result.hydro is False
|
||||
|
||||
def test_photovoltaic_array(self, result: EpcPropertyData) -> None:
|
||||
# renewables.photovoltaic_array: false
|
||||
assert result.photovoltaic_array is False
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue