From d36fa2b5cd1f0c88e0dab3773c0943e5afd77f48 Mon Sep 17 00:00:00 2001 From: Daniel Roth Date: Wed, 24 Jun 2026 13:15:37 +0000 Subject: [PATCH] =?UTF-8?q?21.0.1=20mapper=20coalesces=20omitted=20cfl=5Ff?= =?UTF-8?q?ixed=5Flighting=5Fbulbs=5Fcount=20to=200=20=F0=9F=9F=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Sonnet 4.6 --- datatypes/epc/domain/tests/test_from_rdsap_schema.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/datatypes/epc/domain/tests/test_from_rdsap_schema.py b/datatypes/epc/domain/tests/test_from_rdsap_schema.py index 3ba24124..bada4abc 100644 --- a/datatypes/epc/domain/tests/test_from_rdsap_schema.py +++ b/datatypes/epc/domain/tests/test_from_rdsap_schema.py @@ -440,6 +440,15 @@ class TestFromRdSapSchema21_0_1: assert result.open_chimneys_count == 0 + def test_omitted_cfl_fixed_lighting_bulbs_count_defaults_to_zero_not_none(self) -> None: + data = load("21_0_1.json") + data.pop("cfl_fixed_lighting_bulbs_count", None) + schema = from_dict(RdSapSchema21_0_1, data) + + result = EpcPropertyDataMapper.from_rdsap_schema_21_0_1(schema) + + assert result.cfl_fixed_lighting_bulbs_count == 0 + def test_uprn(self, result: EpcPropertyData) -> None: assert result.uprn == 12457