From 0b4779840372325ef8bcf86cb3cca146fb921572 Mon Sep 17 00:00:00 2001 From: Khalim Conn-Kowlessar Date: Tue, 14 Jul 2026 23:20:09 +0000 Subject: [PATCH] =?UTF-8?q?Capture=20the=20surveyed=20Wall=20Dry-Lined=20a?= =?UTF-8?q?nswer=20per=20building=20part=20=F0=9F=9F=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Fable 5 --- .../documents_parser/tests/test_extractor.py | 23 +++++++++++++++++++ .../epc/surveys/pashub_rdsap_site_notes.py | 5 ++++ 2 files changed, 28 insertions(+) diff --git a/backend/documents_parser/tests/test_extractor.py b/backend/documents_parser/tests/test_extractor.py index 444742b48..934488614 100644 --- a/backend/documents_parser/tests/test_extractor.py +++ b/backend/documents_parser/tests/test_extractor.py @@ -198,6 +198,29 @@ class TestBuildingConstruction: assert construction.extensions is not None assert construction.extensions[0].id == 1 + def test_wall_dry_lined_answers_are_captured(self) -> None: + # Arrange / Act — fixture 7 lodges "Wall Dry-Lined?" per building + # part: Main "No", Extension 1 "Yes", Extension 2 "Yes". Dropped, a + # dry-lined wall is billed at the full uninsulated Table 6 U instead + # of the RdSAP10 §5.8 / Table 14 dry-lining-adjusted value (19% of + # the Guinness accuracy cohort lodges a "Yes"). + construction = PasHubRdSapSiteNotesExtractor( + load_text_fixture_7() + ).extract_building_construction() + + # Assert + assert construction.main_building.dry_lined is False + assert construction.extensions is not None + assert [e.dry_lined for e in construction.extensions] == [True, True] + + def test_wall_dry_lined_not_asked_stays_unknown( + self, construction: BuildingConstruction + ) -> None: + # Fixture 1 never asks "Wall Dry-Lined?" — unknown, NOT a "No". + assert construction.main_building.dry_lined is None + assert construction.extensions is not None + assert construction.extensions[0].dry_lined is None + def test_full_building_construction( self, construction: BuildingConstruction ) -> None: diff --git a/datatypes/epc/surveys/pashub_rdsap_site_notes.py b/datatypes/epc/surveys/pashub_rdsap_site_notes.py index aa278425e..33c691e5a 100644 --- a/datatypes/epc/surveys/pashub_rdsap_site_notes.py +++ b/datatypes/epc/surveys/pashub_rdsap_site_notes.py @@ -47,6 +47,9 @@ class MainBuildingConstruction: wall_thickness_mm: Optional[int] party_wall_construction_type: str filled_cavity_indicators: Optional[str] = None + # "Wall Dry-Lined?" Yes/No; None when the survey doesn't ask (e.g. + # non-masonry system build). + dry_lined: Optional[bool] = None @dataclass @@ -62,6 +65,8 @@ class ExtensionConstruction: wall_thickness_mm: Optional[int] party_wall_construction_type: str filled_cavity_indicators: Optional[str] = None + # "Wall Dry-Lined?" Yes/No; None when the survey doesn't ask. + dry_lined: Optional[bool] = None @dataclass