Map floor construction properties 🟥

This commit is contained in:
Daniel Roth 2026-04-23 14:30:20 +00:00
parent 163e87920c
commit d323fe3277

View file

@ -570,3 +570,36 @@ class TestFromSiteNotesVentilation:
def test_draught_lobby(self, result: EpcPropertyData) -> None:
# ventilation.draught_lobby: false
assert result.sap_ventilation.draught_lobby is False
class TestFromSiteNotesFloorConstruction:
"""
Fixture: pashub_rdsap_site_notes_example1.json
Floor: Suspended not timber, As Built insulation, Ground Floor type.
"""
@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_floor_type(self, result: EpcPropertyData) -> None:
# building_construction.floor.floor_type: "Ground Floor"
assert result.sap_building_parts[0].floor_type == "Ground Floor"
def test_floor_construction_type(self, result: EpcPropertyData) -> None:
# building_construction.floor.floor_construction: "Suspended, not timber"
assert result.sap_building_parts[0].floor_construction_type == "Suspended, not timber"
def test_floor_insulation_type_str(self, result: EpcPropertyData) -> None:
# building_construction.floor.floor_insulation_type: "As Built"
assert result.sap_building_parts[0].floor_insulation_type_str == "As Built"
def test_floor_u_value_known(self, result: EpcPropertyData) -> None:
# building_construction.floor.floor_u_value_known: false
assert result.sap_building_parts[0].floor_u_value_known is False