Landlord 'Secondary glazing' override overlays SAP10 glazing code 5 🟥

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
Jun-te Kim 2026-07-02 11:02:11 +00:00
parent c1169b2d39
commit 5c9ca727cd

View file

@ -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