mirror of
https://github.com/Hestia-Homes/Model.git
synced 2026-07-12 13:29:04 +00:00
Numeric RdSAP property-type codes map to their labels 🟥
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
parent
e1dc0dc2f5
commit
302861309c
1 changed files with 19 additions and 0 deletions
|
|
@ -177,6 +177,25 @@ def test_epc_property_type_prefers_lodged_over_predicted(db_engine: Engine) -> N
|
|||
assert [p.property_id for p in resolved] == [predicted_only]
|
||||
|
||||
|
||||
def test_epc_numeric_property_type_codes_map_to_labels(db_engine: Engine) -> None:
|
||||
# arrange — RdSAP code 1 = Bungalow
|
||||
with Session(db_engine) as session:
|
||||
coded = _seed_property(session, portfolio_id=814)
|
||||
_seed_epc(session, property_id=coded, property_type="1")
|
||||
_house = _seed_property(session, portfolio_id=814)
|
||||
_seed_epc(session, property_id=_house, property_type="0")
|
||||
|
||||
# act
|
||||
resolved = resolve_filtered_property_ids(
|
||||
session,
|
||||
portfolio_id=814,
|
||||
filters=PropertyGroupFilters(property_types=["Bungalow"]),
|
||||
)
|
||||
|
||||
# assert
|
||||
assert [p.property_id for p in resolved] == [coded]
|
||||
|
||||
|
||||
def test_postcode_filter_matches_exactly(db_engine: Engine) -> None:
|
||||
# arrange
|
||||
with Session(db_engine) as session:
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue