2025-05-28 18:28:37 +02:00
|
|
|
"""Tests for the LIRC."""
|
|
|
|
|
|
|
|
from unittest.mock import Mock, patch
|
|
|
|
|
|
|
|
from homeassistant.core import DOMAIN as HOMEASSISTANT_DOMAIN, HomeAssistant
|
|
|
|
from homeassistant.helpers import issue_registry as ir
|
|
|
|
from homeassistant.setup import async_setup_component
|
|
|
|
|
|
|
|
|
|
|
|
@patch.dict("sys.modules", lirc=Mock())
|
|
|
|
async def test_repair_issue_is_created(
|
|
|
|
hass: HomeAssistant,
|
|
|
|
issue_registry: ir.IssueRegistry,
|
|
|
|
) -> None:
|
|
|
|
"""Test repair issue is created."""
|
2025-06-19 20:39:09 +02:00
|
|
|
from homeassistant.components.lirc import DOMAIN # noqa: PLC0415
|
2025-05-28 18:28:37 +02:00
|
|
|
|
|
|
|
assert await async_setup_component(
|
|
|
|
hass,
|
2025-06-02 08:54:55 +02:00
|
|
|
DOMAIN,
|
2025-05-28 18:28:37 +02:00
|
|
|
{
|
2025-06-02 08:54:55 +02:00
|
|
|
DOMAIN: {},
|
2025-05-28 18:28:37 +02:00
|
|
|
},
|
|
|
|
)
|
|
|
|
await hass.async_block_till_done()
|
|
|
|
assert (
|
|
|
|
HOMEASSISTANT_DOMAIN,
|
2025-06-02 08:54:55 +02:00
|
|
|
f"deprecated_system_packages_yaml_integration_{DOMAIN}",
|
2025-05-28 18:28:37 +02:00
|
|
|
) in issue_registry.issues
|