Prevent creating scripts which override script services (#96828)

This commit is contained in:
Erik Montnemery
2023-07-18 12:10:40 +02:00
committed by GitHub
parent 8b5bdf9e2f
commit 4ceba01ab7
3 changed files with 65 additions and 1 deletions

View File

@ -196,6 +196,15 @@ async def test_setup_with_invalid_configs(
"has invalid object id",
"invalid slug Bad Script",
),
(
"turn_on",
{},
"has invalid object id",
(
"A script's object_id must not be one of "
"reload, toggle, turn_off, turn_on. Got 'turn_on'"
),
),
),
)
async def test_bad_config_validation_critical(