mirror of
https://github.com/Hestia-Homes/Model.git
synced 2026-07-12 13:29:04 +00:00
Landlord 'Secondary glazing' override overlays SAP10 glazing code 5 🟥
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
parent
c1169b2d39
commit
5c9ca727cd
1 changed files with 15 additions and 0 deletions
|
|
@ -48,6 +48,21 @@ def test_glazing_types_decode_to_their_sap_codes(
|
|||
assert simulation.glazing.glazing_type == code
|
||||
|
||||
|
||||
def test_secondary_glazing_overlays_its_glazing_code() -> None:
|
||||
# Hyde-796 landlords assert "100% secondary glazing (sap 9.94)"; flattening it
|
||||
# to Single applies U = 4.8 instead of secondary's 2.9 (Model#1416). The
|
||||
# calculator already understands secondary glazing — SAP10 glazing_type code 5
|
||||
# (`_GLAZING_CODE_TO_UWINDOW` in heat_transmission).
|
||||
|
||||
# Act
|
||||
simulation = glazing_overlay_for("Secondary glazing", 0)
|
||||
|
||||
# Assert
|
||||
assert simulation is not None
|
||||
assert simulation.glazing is not None
|
||||
assert simulation.glazing.glazing_type == 5
|
||||
|
||||
|
||||
@pytest.mark.parametrize("glazing_value", ["Unknown", ""])
|
||||
def test_unresolvable_glazing_produces_no_overlay(glazing_value: str) -> None:
|
||||
# Act
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue