diff --git a/datatypes/epc/domain/tests/test_from_rdsap_schema.py b/datatypes/epc/domain/tests/test_from_rdsap_schema.py index bada4abc..440325ce 100644 --- a/datatypes/epc/domain/tests/test_from_rdsap_schema.py +++ b/datatypes/epc/domain/tests/test_from_rdsap_schema.py @@ -449,6 +449,15 @@ class TestFromRdSapSchema21_0_1: assert result.cfl_fixed_lighting_bulbs_count == 0 + def test_omitted_led_fixed_lighting_bulbs_count_defaults_to_zero_not_none(self) -> None: + data = load("21_0_1.json") + data.pop("led_fixed_lighting_bulbs_count", None) + schema = from_dict(RdSapSchema21_0_1, data) + + result = EpcPropertyDataMapper.from_rdsap_schema_21_0_1(schema) + + assert result.led_fixed_lighting_bulbs_count == 0 + def test_uprn(self, result: EpcPropertyData) -> None: assert result.uprn == 12457