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

Validating schema outside the event loop will now fail (#153472)

This commit is contained in:
G Johansson
2025-10-05 22:37:14 +02:00
committed by GitHub
parent f524edc4b9
commit 1818fce1ae
2 changed files with 5 additions and 10 deletions

View File

@@ -711,7 +711,10 @@ async def test_template_no_hass(hass: HomeAssistant) -> None:
"{{ no_such_function('group.foo')|map(attribute='entity_id')|list }}",
)
for value in options:
await hass.async_add_executor_job(schema, value)
with pytest.raises(
vol.Invalid, match="Validates schema outside the event loop"
):
await hass.async_add_executor_job(schema, value)
def test_dynamic_template(hass: HomeAssistant) -> None: