mirror of
https://github.com/home-assistant/core.git
synced 2026-09-26 17:31:15 -04:00
Assert the translation metadata in the kodi notify error test (#182605)
Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
@@ -5,6 +5,7 @@ from unittest.mock import AsyncMock, patch
|
||||
import jsonrpc_async
|
||||
import pytest
|
||||
|
||||
from homeassistant.components.kodi.const import DOMAIN
|
||||
from homeassistant.components.notify import DOMAIN as NOTIFY_DOMAIN
|
||||
from homeassistant.core import HomeAssistant
|
||||
from homeassistant.exceptions import HomeAssistantError
|
||||
@@ -47,7 +48,10 @@ async def test_send_message_transport_error(hass: HomeAssistant) -> None:
|
||||
)
|
||||
await setup_notify(hass, server)
|
||||
|
||||
with pytest.raises(HomeAssistantError):
|
||||
with pytest.raises(HomeAssistantError) as err:
|
||||
await hass.services.async_call(
|
||||
NOTIFY_DOMAIN, "kodi", {"message": "Hello"}, blocking=True
|
||||
)
|
||||
|
||||
assert err.value.translation_domain == DOMAIN
|
||||
assert err.value.translation_key == "notify_failed"
|
||||
|
||||
Reference in New Issue
Block a user