Test that we do not initialize bad configuration (#48872)
* Test that we do not initialize bad configuration * Simplify test as we are not calling a service
This commit is contained in:
parent
b0aa64d59c
commit
a59460a233
1 changed files with 20 additions and 0 deletions
|
@ -1357,6 +1357,26 @@ async def test_blueprint_automation(hass, calls):
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
|
async def test_blueprint_automation_bad_config(hass, caplog):
|
||||||
|
"""Test blueprint automation with bad inputs."""
|
||||||
|
assert await async_setup_component(
|
||||||
|
hass,
|
||||||
|
"automation",
|
||||||
|
{
|
||||||
|
"automation": {
|
||||||
|
"use_blueprint": {
|
||||||
|
"path": "test_event_service.yaml",
|
||||||
|
"input": {
|
||||||
|
"trigger_event": "blueprint_event",
|
||||||
|
"service_to_call": {"dict": "not allowed"},
|
||||||
|
},
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
)
|
||||||
|
assert "generated invalid automation" in caplog.text
|
||||||
|
|
||||||
|
|
||||||
async def test_trigger_service(hass, calls):
|
async def test_trigger_service(hass, calls):
|
||||||
"""Test the automation trigger service."""
|
"""Test the automation trigger service."""
|
||||||
assert await async_setup_component(
|
assert await async_setup_component(
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue