mirror of
https://github.com/home-assistant/core.git
synced 2026-04-27 04:03:49 +01:00
Refactor persistent notification to no longer route all data via a service (#57157)
* Convert persistent notification tests to async * Create/dismiss persistent notifications in exposed functions, not service calls * Fix notify persistent_notification * Remove setting up persistent_notification * Drop more setups * Empty methods * Undeprecate sync methods because too big task * Fix setup clearing notifications * Fix a bunch of tests * Fix more tests * Uno mas * Test persistent notification events * Clean up stale comment Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
"""Test the NEW_NAME config flow."""
|
||||
from unittest.mock import patch
|
||||
|
||||
from homeassistant import config_entries, setup
|
||||
from homeassistant import config_entries
|
||||
from homeassistant.components.NEW_DOMAIN.config_flow import CannotConnect, InvalidAuth
|
||||
from homeassistant.components.NEW_DOMAIN.const import DOMAIN
|
||||
from homeassistant.core import HomeAssistant
|
||||
@@ -10,7 +10,6 @@ from homeassistant.data_entry_flow import RESULT_TYPE_CREATE_ENTRY, RESULT_TYPE_
|
||||
|
||||
async def test_form(hass: HomeAssistant) -> None:
|
||||
"""Test we get the form."""
|
||||
await setup.async_setup_component(hass, "persistent_notification", {})
|
||||
result = await hass.config_entries.flow.async_init(
|
||||
DOMAIN, context={"source": config_entries.SOURCE_USER}
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user