mirror of
https://github.com/Hestia-Homes/Model.git
synced 2026-07-27 23:35:01 +00:00
Carry Property identity and Effective-EPC fields onto the export row 🟥
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
c2aca6d2e6
commit
6fc94b1cc4
1 changed files with 33 additions and 0 deletions
|
|
@ -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"] == ""
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue