From 6fc94b1cc4951fc0e066464f3f8e89e053ad535a Mon Sep 17 00:00:00 2001 From: Khalim Conn-Kowlessar Date: Mon, 13 Jul 2026 23:15:18 +0000 Subject: [PATCH] =?UTF-8?q?Carry=20Property=20identity=20and=20Effective-E?= =?UTF-8?q?PC=20fields=20onto=20the=20export=20row=20=F0=9F=9F=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Opus 4.8 (1M context) --- .../scenario_export/test_scenario_sheet.py | 33 +++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/tests/domain/scenario_export/test_scenario_sheet.py b/tests/domain/scenario_export/test_scenario_sheet.py index 44d756c3d..bc31d7118 100644 --- a/tests/domain/scenario_export/test_scenario_sheet.py +++ b/tests/domain/scenario_export/test_scenario_sheet.py @@ -191,3 +191,36 @@ def test_plan_post_works_figures_come_from_the_plan_row_blank_when_absent() -> N assert row["cost_of_works"] == 4200.0 assert row["valuation_increase"] == 15000.0 assert row["contingency_cost"] == "" + + +def test_identity_and_effective_epc_descriptive_fields_pass_through() -> None: + # arrange — a Property with identity and (already override-resolved) + # Effective-EPC descriptive fields; the floor description is absent. + prop = _property( + property_id=7, + landlord_property_id="LP7", + uprn="100023", + address="12 Oak Street", + postcode="AB1 2CD", + property_type="House", + walls="Cavity wall, as built, insulated", + roof="Pitched, 250mm loft insulation", + current_epc_rating="D", + current_sap_points=58.0, + ) + + # act + sheet = shape_scenario_sheet([prop]) + + # assert — identity and descriptive fields appear as supplied; an unsupplied + # descriptive field is blank. + row = sheet.rows[0] + assert row["uprn"] == "100023" + assert row["address"] == "12 Oak Street" + assert row["postcode"] == "AB1 2CD" + assert row["property_type"] == "House" + assert row["walls"] == "Cavity wall, as built, insulated" + assert row["roof"] == "Pitched, 250mm loft insulation" + assert row["current_epc_rating"] == "D" + assert row["current_sap_points"] == 58.0 + assert row["floor"] == ""