Capture the surveyed Wall Dry-Lined answer per building part 🟥

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
Khalim Conn-Kowlessar 2026-07-14 23:20:09 +00:00
parent 1f1bb8a556
commit 0b47798403
2 changed files with 28 additions and 0 deletions

View file

@ -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:

View file

@ -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