21.0.1 mapper coalesces omitted open_chimneys_count to 0 🟥

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Daniel Roth 2026-06-24 13:13:43 +00:00
parent fc7cfc70e8
commit 6efbd4649d

View file

@ -431,6 +431,15 @@ class TestFromRdSapSchema21_0_1:
assert result.wet_rooms_count == 0
def test_omitted_open_chimneys_count_defaults_to_zero_not_none(self) -> None:
data = load("21_0_1.json")
data.pop("open_chimneys_count", None)
schema = from_dict(RdSapSchema21_0_1, data)
result = EpcPropertyDataMapper.from_rdsap_schema_21_0_1(schema)
assert result.open_chimneys_count == 0
def test_uprn(self, result: EpcPropertyData) -> None:
assert result.uprn == 12457