diff --git a/backend/documents_parser/tests/test_end_to_end.py b/backend/documents_parser/tests/test_end_to_end.py index 5d0bc31d..b994cd11 100644 --- a/backend/documents_parser/tests/test_end_to_end.py +++ b/backend/documents_parser/tests/test_end_to_end.py @@ -267,3 +267,6 @@ class TestPdfToEpcPropertyDataFixture2: def test_cylinder_insulation_thickness(self, result: EpcPropertyData) -> None: assert result.sap_heating.cylinder_insulation_thickness_mm == 38 + + def test_cylinder_size(self, result: EpcPropertyData) -> None: + assert result.sap_heating.cylinder_size == "Normal (90-130 litres)" diff --git a/backend/documents_parser/tests/test_extractor.py b/backend/documents_parser/tests/test_extractor.py index 6eda5284..27214fd2 100644 --- a/backend/documents_parser/tests/test_extractor.py +++ b/backend/documents_parser/tests/test_extractor.py @@ -398,6 +398,9 @@ class TestWaterHeatingCylinderThickness: def test_cylinder_insulation_thickness_mm_absent(self, hhw_no_cylinder: HeatingAndHotWater) -> None: assert hhw_no_cylinder.water_heating.insulation_thickness_mm is None + def test_cylinder_size(self, hhw: HeatingAndHotWater) -> None: + assert hhw.water_heating.cylinder_size == "Normal (90-130 litres)" + class TestHeatingAndHotWater: @pytest.fixture diff --git a/datatypes/epc/domain/epc_property_data.py b/datatypes/epc/domain/epc_property_data.py index cc21d7f9..f0d8607d 100644 --- a/datatypes/epc/domain/epc_property_data.py +++ b/datatypes/epc/domain/epc_property_data.py @@ -54,8 +54,8 @@ class SapHeating: instantaneous_wwhrs: InstantaneousWwhrs main_heating_details: List[MainHeatingDetail] has_fixed_air_conditioning: bool - cylinder_size: Optional[int] = ( - None # int code from API; not directly available from site notes + cylinder_size: Optional[Union[int, str]] = ( + None # int code from API; str (e.g. "Normal (90-130 litres)") from site notes ) water_heating_code: Optional[int] = None # TODO: make enum? water_heating_fuel: Optional[int] = None # TODO: make enum?