Change multi_select config validator to class (#31828)
* Move multi_select to class * Fix serializer and add test * Serializer should also return options
This commit is contained in:
parent
d6f0c26e7f
commit
043d36f7c6
2 changed files with 18 additions and 8 deletions
|
@ -488,6 +488,14 @@ def test_multi_select():
|
|||
schema(["robban", "paulus"])
|
||||
|
||||
|
||||
def test_multi_select_in_serializer():
|
||||
"""Test multi_select with custom_serializer."""
|
||||
assert cv.custom_serializer(cv.multi_select({"paulus": "Paulus"})) == {
|
||||
"type": "multi_select",
|
||||
"options": {"paulus": "Paulus"},
|
||||
}
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
def schema():
|
||||
"""Create a schema used for testing deprecation."""
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue