From 4af086112a8e28c44668d704d9160e25ef720aa3 Mon Sep 17 00:00:00 2001 From: Daniel Roth Date: Thu, 16 Jul 2026 16:28:09 +0000 Subject: [PATCH] =?UTF-8?q?Bill=20title-cased=20dual-fuel=20secondary=20he?= =?UTF-8?q?aters=20at=20Table=2032=20code=2010=20=F0=9F=9F=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Fable 5 --- .../epc/domain/tests/test_from_site_notes.py | 25 +++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/datatypes/epc/domain/tests/test_from_site_notes.py b/datatypes/epc/domain/tests/test_from_site_notes.py index c31793982..b8f6a1377 100644 --- a/datatypes/epc/domain/tests/test_from_site_notes.py +++ b/datatypes/epc/domain/tests/test_from_site_notes.py @@ -1223,6 +1223,31 @@ class TestSecondaryHeatingTypeCoding: EpcPropertyDataMapper.from_site_notes(survey) +class TestSecondaryFuelTypeCodingDualFuel: + """The secondary-heating survey field lodges the dual-fuel appliance + title-cased ("Dual Fuel Appliance (Mineral and Wood)"), unlike the + sentence-case main-fuel label already mapped — exact-string lookups, so + both tables need their own entry. Same physical fuel, same Table 32 + code 10 the main-fuel path pins.""" + + def test_title_case_dual_fuel_maps_to_table_32_code_10(self) -> None: + # Arrange + data = load("pashub_rdsap_site_notes_example1.json") + data["heating_and_hot_water"]["secondary_heating"][ + "secondary_fuel" + ] = "Dual Fuel Appliance (Mineral and Wood)" + data["heating_and_hot_water"]["secondary_heating"][ + "secondary_system" + ] = "Open fire in grate" + survey = from_dict(PasHubRdSapSiteNotes, data) + + # Act + result = EpcPropertyDataMapper.from_site_notes(survey) + + # Assert + assert result.sap_heating.secondary_fuel_type == 10 + + class TestSecondaryFuelTypeCoding: """`from_site_notes` must int-code the PAS Hub secondary-heating `secondary_fuel` label to the SAP 10.2 Table 32 `secondary_fuel_type`