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

Improve entity domain validator (#43164)

This commit is contained in:
Paulus Schoutsen
2020-11-13 13:31:43 +01:00
committed by GitHub
parent 87d86026ed
commit 0a717f313e
2 changed files with 11 additions and 3 deletions

View File

@@ -179,7 +179,12 @@ def test_entity_domain():
"""Test entity domain validation."""
schema = vol.Schema(cv.entity_domain("sensor"))
for value in ("invalid_entity", "cover.demo"):
for value in (
"invalid_entity",
"cover.demo",
"cover.demo,sensor.another_entity",
"",
):
with pytest.raises(vol.MultipleInvalid):
schema(value)