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:
Paulus Schoutsen 2021-04-08 13:04:39 -07:00 committed by GitHub
parent b0aa64d59c
commit a59460a233
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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):
"""Test the automation trigger service."""
assert await async_setup_component(