mirror of
https://github.com/Hestia-Homes/Model.git
synced 2026-07-12 13:29:04 +00:00
Route a water_heating override row through its overlay mapper 🟥
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
c6ab9ba383
commit
55e83c7f9f
1 changed files with 20 additions and 0 deletions
|
|
@ -92,6 +92,26 @@ def test_construction_age_band_row_produces_a_building_part_overlay() -> None:
|
||||||
assert main.construction_age_band == "B"
|
assert main.construction_age_band == "B"
|
||||||
|
|
||||||
|
|
||||||
|
def test_water_heating_row_produces_a_heating_overlay() -> None:
|
||||||
|
# Arrange
|
||||||
|
overrides = ResolvedPropertyOverrides(
|
||||||
|
rows=(
|
||||||
|
ResolvedPropertyOverride(
|
||||||
|
"water_heating", 0, "From main system, mains gas"
|
||||||
|
),
|
||||||
|
)
|
||||||
|
)
|
||||||
|
|
||||||
|
# Act
|
||||||
|
overlays = overlays_from(overrides)
|
||||||
|
|
||||||
|
# Assert
|
||||||
|
assert len(overlays) == 1
|
||||||
|
assert overlays[0].heating is not None
|
||||||
|
assert overlays[0].heating.water_heating_code == 901
|
||||||
|
assert overlays[0].heating.water_heating_fuel == 26
|
||||||
|
|
||||||
|
|
||||||
def test_unresolvable_rows_are_skipped() -> None:
|
def test_unresolvable_rows_are_skipped() -> None:
|
||||||
# Arrange — an "Unknown" property type and an unmapped wall material.
|
# Arrange — an "Unknown" property type and an unmapped wall material.
|
||||||
overrides = ResolvedPropertyOverrides(
|
overrides = ResolvedPropertyOverrides(
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue