mirror of
https://github.com/home-assistant/core.git
synced 2025-07-27 15:17:35 +00:00
Fix data entry flow test
This commit is contained in:
parent
6f500be6e2
commit
1e6f04f7f9
@ -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(
|
||||
|
Loading…
x
Reference in New Issue
Block a user