forked from home-assistant/core
Fix data entry flow test
This commit is contained in:
@@ -1020,8 +1020,8 @@ def test_section_in_serializer() -> None:
|
|||||||
{"name": "option_2", "required": True, "type": "integer"},
|
{"name": "option_2", "required": True, "type": "integer"},
|
||||||
],
|
],
|
||||||
"type": "expandable",
|
"type": "expandable",
|
||||||
"multiple": None,
|
"multiple": False,
|
||||||
"default": None,
|
"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:
|
def test_nested_section_in_serializer() -> None:
|
||||||
"""Test section with custom_serializer."""
|
"""Test section with custom_serializer."""
|
||||||
with pytest.raises(
|
with pytest.raises(
|
||||||
|
Reference in New Issue
Block a user