mirror of
https://github.com/home-assistant/core.git
synced 2025-07-21 12:17:07 +00:00
Fix lg_thinq RuntimeWarning in tests (#143448)
This commit is contained in:
parent
aedd60e74f
commit
72337e4c77
@ -94,7 +94,7 @@ def mock_invalid_thinq_api(mock_config_thinq_api: AsyncMock) -> AsyncMock:
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
def mock_thinq_api() -> Generator[AsyncMock]:
|
||||
def mock_thinq_api(mock_thinq_mqtt_client: None) -> Generator[AsyncMock]:
|
||||
"""Mock a thinq api."""
|
||||
with patch("homeassistant.components.lg_thinq.ThinQApi", autospec=True) as mock_api:
|
||||
thinq_api = mock_api.return_value
|
||||
@ -111,7 +111,7 @@ def mock_thinq_api() -> Generator[AsyncMock]:
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
def mock_thinq_mqtt_client() -> Generator[AsyncMock]:
|
||||
def mock_thinq_mqtt_client() -> Generator[None]:
|
||||
"""Mock a thinq mqtt client."""
|
||||
with patch(
|
||||
"homeassistant.components.lg_thinq.mqtt.ThinQMQTTClient",
|
||||
|
@ -15,7 +15,6 @@ from tests.common import MockConfigEntry
|
||||
async def test_load_unload_entry(
|
||||
hass: HomeAssistant,
|
||||
mock_thinq_api: AsyncMock,
|
||||
mock_thinq_mqtt_client: AsyncMock,
|
||||
mock_config_entry: MockConfigEntry,
|
||||
) -> None:
|
||||
"""Test load and unload entry."""
|
||||
@ -37,7 +36,6 @@ async def test_load_unload_entry(
|
||||
async def test_config_not_ready(
|
||||
hass: HomeAssistant,
|
||||
mock_thinq_api: AsyncMock,
|
||||
mock_thinq_mqtt_client: AsyncMock,
|
||||
mock_config_entry: MockConfigEntry,
|
||||
exception: Exception,
|
||||
) -> None:
|
||||
|
Loading…
x
Reference in New Issue
Block a user