1
0
mirror of https://github.com/home-assistant/core.git synced 2025-12-24 12:59:34 +00:00

Fix selector to return the selector type (#43395)

This commit is contained in:
Bram Kragten
2020-11-19 16:48:43 +01:00
committed by GitHub
parent edd25ae338
commit 5dcbb634f6
2 changed files with 12 additions and 4 deletions

View File

@@ -14,6 +14,12 @@ def test_invalid_base_schema(schema):
selector.validate_selector(schema)
def test_validate_selector():
"""Test return is the same as input."""
schema = {"device": {"manufacturer": "mock-manuf", "model": "mock-model"}}
assert schema == selector.validate_selector(schema)
@pytest.mark.parametrize(
"schema",
(
@@ -40,5 +46,5 @@ def test_device_selector_schema(schema):
),
)
def test_entity_selector_schema(schema):
"""Test device selector."""
"""Test entity selector."""
selector.validate_selector({"entity": schema})