mirror of
https://github.com/home-assistant/core.git
synced 2025-07-13 16:27:08 +00:00
Add missing mock in airq config flow tests (#89364)
This commit is contained in:
parent
3a40f5f35b
commit
33906059d3
14
tests/components/airq/conftest.py
Normal file
14
tests/components/airq/conftest.py
Normal file
@ -0,0 +1,14 @@
|
||||
"""Test fixtures for air-Q."""
|
||||
from collections.abc import Generator
|
||||
from unittest.mock import AsyncMock, patch
|
||||
|
||||
import pytest
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
def mock_setup_entry() -> Generator[AsyncMock, None, None]:
|
||||
"""Override async_setup_entry."""
|
||||
with patch(
|
||||
"homeassistant.components.airq.async_setup_entry", return_value=True
|
||||
) as mock_setup_entry:
|
||||
yield mock_setup_entry
|
@ -3,6 +3,7 @@ from unittest.mock import patch
|
||||
|
||||
from aioairq.core import DeviceInfo, InvalidAuth, InvalidInput
|
||||
from aiohttp.client_exceptions import ClientConnectionError
|
||||
import pytest
|
||||
|
||||
from homeassistant import config_entries
|
||||
from homeassistant.components.airq.const import DOMAIN
|
||||
@ -10,6 +11,8 @@ from homeassistant.const import CONF_IP_ADDRESS, CONF_PASSWORD
|
||||
from homeassistant.core import HomeAssistant
|
||||
from homeassistant.data_entry_flow import FlowResultType
|
||||
|
||||
pytestmark = pytest.mark.usefixtures("mock_setup_entry")
|
||||
|
||||
TEST_USER_DATA = {
|
||||
CONF_IP_ADDRESS: "192.168.0.0",
|
||||
CONF_PASSWORD: "password",
|
||||
|
Loading…
x
Reference in New Issue
Block a user