Add trigger for persistent_notification (#94809)

Co-authored-by: J. Nick Koston <nick@koston.org>
This commit is contained in:
RoboMagus 2023-06-21 11:55:06 +02:00 committed by GitHub
parent 605c4db142
commit 3bacd9df2f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 207 additions and 9 deletions

View file

@ -1,5 +1,5 @@
"""The tests for the persistent notification component."""
import pytest
import homeassistant.components.persistent_notification as pn
from homeassistant.components.websocket_api.const import TYPE_RESULT
@ -9,12 +9,6 @@ from homeassistant.setup import async_setup_component
from tests.typing import WebSocketGenerator
@pytest.fixture(autouse=True)
async def setup_integration(hass):
"""Set up persistent notification integration."""
assert await async_setup_component(hass, pn.DOMAIN, {})
async def test_create(hass: HomeAssistant) -> None:
"""Test creating notification without title or notification id."""
notifications = pn._async_get_or_create_notifications(hass)