mirror of
https://github.com/home-assistant/core.git
synced 2025-11-09 19:09:32 +00:00
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:
@@ -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."""
|
||||
|
||||
Reference in New Issue
Block a user