mirror of
https://github.com/home-assistant/core.git
synced 2025-08-03 04:35:11 +02:00
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:
@@ -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(
|
||||
|
Reference in New Issue
Block a user