diff --git a/datatypes/epc/domain/tests/test_from_site_notes.py b/datatypes/epc/domain/tests/test_from_site_notes.py index 7b552773..637abad5 100644 --- a/datatypes/epc/domain/tests/test_from_site_notes.py +++ b/datatypes/epc/domain/tests/test_from_site_notes.py @@ -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