From 1e6f04f7f98f43f51bf9f83cf19af49337e8b584 Mon Sep 17 00:00:00 2001 From: G Johansson Date: Sun, 24 Nov 2024 22:01:28 +0000 Subject: [PATCH] Fix data entry flow test --- tests/test_data_entry_flow.py | 33 ++------------------------------- 1 file changed, 2 insertions(+), 31 deletions(-) diff --git a/tests/test_data_entry_flow.py b/tests/test_data_entry_flow.py index 3522d7236f5..33ca3f5d753 100644 --- a/tests/test_data_entry_flow.py +++ b/tests/test_data_entry_flow.py @@ -1020,8 +1020,8 @@ def test_section_in_serializer() -> None: {"name": "option_2", "required": True, "type": "integer"}, ], "type": "expandable", - "multiple": None, - "default": None, + "multiple": False, + "default": [], } @@ -1054,35 +1054,6 @@ def test_section_multiple_in_serializer() -> None: } -def test_section_multiple_and_default_inclusive_in_serializer() -> None: - """Test section with multiple missing default in custom_serializer.""" - with pytest.raises(vol.MultipleInvalid): - cv.custom_serializer( - data_entry_flow.section( - vol.Schema( - { - vol.Optional("option_1", default=False): bool, - vol.Required("option_2"): int, - } - ), - {"collapsed": False, "multiple": None}, - ) - ) - - with pytest.raises(vol.MultipleInvalid): - cv.custom_serializer( - data_entry_flow.section( - vol.Schema( - { - vol.Optional("option_1", default=False): bool, - vol.Required("option_2"): int, - } - ), - {"collapsed": False, "default": []}, - ) - ) - - def test_nested_section_in_serializer() -> None: """Test section with custom_serializer.""" with pytest.raises(