mirror of
https://github.com/Hestia-Homes/Model.git
synced 2026-06-08 11:17:27 +00:00
refactor full extract test
This commit is contained in:
parent
edecbe6bef
commit
c271caf378
1 changed files with 15 additions and 9 deletions
|
|
@ -19,7 +19,6 @@ from datatypes.epc.surveys.pashub_rdsap_site_notes import (
|
|||
MainBuildingConstruction,
|
||||
MainBuildingMeasurements,
|
||||
MainHeating,
|
||||
PasHubRdSapSiteNotes,
|
||||
Renewables,
|
||||
RoomCountElements,
|
||||
RoofSpace,
|
||||
|
|
@ -528,15 +527,22 @@ class TestCustomerResponse:
|
|||
|
||||
|
||||
class TestExtract:
|
||||
@pytest.fixture
|
||||
def result(self) -> PasHubRdSapSiteNotes:
|
||||
return PasHubRdSapSiteNotesExtractor(load_text_fixture()).extract()
|
||||
|
||||
def test_returns_pashub_site_notes(self, result: PasHubRdSapSiteNotes) -> None:
|
||||
assert isinstance(result, PasHubRdSapSiteNotes)
|
||||
|
||||
def test_general_is_correct(self, result: PasHubRdSapSiteNotes) -> None:
|
||||
def test_full_extract(self) -> None:
|
||||
result = PasHubRdSapSiteNotesExtractor(load_text_fixture()).extract()
|
||||
assert result.inspection_metadata is None
|
||||
assert result.general.inspection_date == "2025-09-25"
|
||||
assert result.building_construction.main_building.wall_thickness_mm == 310
|
||||
assert result.building_measurements.main_building.floors[0].area_m2 == 35.68
|
||||
assert result.roof_space.main_building.insulation_thickness_mm == 100
|
||||
assert len(result.windows) == 8
|
||||
assert result.heating_and_hot_water.main_heating.product_id == 16839
|
||||
assert result.ventilation.ventilation_type == "Mechanical Extract - Decentralised"
|
||||
assert result.conservatories.has_conservatory is False
|
||||
assert result.renewables.number_of_pv_batteries == 0
|
||||
assert result.room_count_elements.number_of_habitable_rooms == 3
|
||||
assert result.water_use.number_of_baths == 1
|
||||
assert result.customer_response.customer_present is True
|
||||
assert result.addendum.addendum == "None"
|
||||
|
||||
|
||||
class TestSurveyAddendum:
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue