1
mirror of https://github.com/home-assistant/core synced 2024-09-18 19:55:20 +02:00
ha-core/tests/helpers/test_trigger.py
2020-08-17 11:54:56 -05:00

13 lines
429 B
Python

"""The tests for the trigger helper."""
import pytest
import voluptuous as vol
from homeassistant.helpers.trigger import async_validate_trigger_config
async def test_bad_trigger_platform(hass):
"""Test bad trigger platform."""
with pytest.raises(vol.Invalid) as ex:
await async_validate_trigger_config(hass, [{"platform": "not_a_platform"}])
assert "Invalid platform 'not_a_platform' specified" in str(ex)