mirror of
https://github.com/Hestia-Homes/Model.git
synced 2026-06-30 13:10:47 +00:00
Remap the EPC hot-water arrangement from a landlord override 🟩
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
805dfc70a2
commit
b5ef41ea62
1 changed files with 18 additions and 0 deletions
|
|
@ -11,6 +11,10 @@ import pytest
|
|||
from domain.epc.property_overlays.water_heating_overlay import (
|
||||
water_heating_overlay_for,
|
||||
)
|
||||
from domain.modelling.scoring.overlay_applicator import apply_simulations
|
||||
from tests.domain.sap10_calculator.worksheet._elmhurst_worksheet_000490 import (
|
||||
build_epc,
|
||||
)
|
||||
|
||||
|
||||
def test_from_main_system_mains_gas_overlays_water_heating() -> None:
|
||||
|
|
@ -53,3 +57,17 @@ def test_unresolvable_water_heating_produces_no_overlay(
|
|||
|
||||
# Assert
|
||||
assert simulation is None
|
||||
|
||||
|
||||
def test_water_heating_override_remaps_the_hot_water_arrangement() -> None:
|
||||
# Arrange — landlord correction: HW is a separate electric immersion.
|
||||
baseline = build_epc()
|
||||
overlay = water_heating_overlay_for("Electric immersion, electricity", 0)
|
||||
assert overlay is not None
|
||||
|
||||
# Act
|
||||
result = apply_simulations(baseline, [overlay])
|
||||
|
||||
# Assert — the calculator reads these off sap_heating.
|
||||
assert result.sap_heating.water_heating_code == 903
|
||||
assert result.sap_heating.water_heating_fuel == 29
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue