Fix uncaught error in OpenUV diagnostics test (#80116)
This commit is contained in:
parent
4ea46bf841
commit
2f6e55b3bb
1 changed files with 7 additions and 2 deletions
|
@ -1,14 +1,19 @@
|
||||||
"""Test OpenUV diagnostics."""
|
"""Test OpenUV diagnostics."""
|
||||||
from homeassistant.components.diagnostics import REDACTED
|
from homeassistant.components.diagnostics import REDACTED
|
||||||
from homeassistant.components.openuv import CONF_ENTRY_ID
|
from homeassistant.const import CONF_ENTITY_ID
|
||||||
|
from homeassistant.setup import async_setup_component
|
||||||
|
|
||||||
from tests.components.diagnostics import get_diagnostics_for_config_entry
|
from tests.components.diagnostics import get_diagnostics_for_config_entry
|
||||||
|
|
||||||
|
|
||||||
async def test_entry_diagnostics(hass, config_entry, hass_client, setup_openuv):
|
async def test_entry_diagnostics(hass, config_entry, hass_client, setup_openuv):
|
||||||
"""Test config entry diagnostics."""
|
"""Test config entry diagnostics."""
|
||||||
|
await async_setup_component(hass, "homeassistant", {})
|
||||||
await hass.services.async_call(
|
await hass.services.async_call(
|
||||||
"openuv", "update_data", service_data={CONF_ENTRY_ID: "test_entry_id"}
|
"homeassistant",
|
||||||
|
"update_entity",
|
||||||
|
{CONF_ENTITY_ID: ["sensor.current_uv_index"]},
|
||||||
|
blocking=True,
|
||||||
)
|
)
|
||||||
assert await get_diagnostics_for_config_entry(hass, hass_client, config_entry) == {
|
assert await get_diagnostics_for_config_entry(hass, hass_client, config_entry) == {
|
||||||
"entry": {
|
"entry": {
|
||||||
|
|
Loading…
Add table
Reference in a new issue