mirror of
https://github.com/home-assistant/core.git
synced 2026-04-02 00:20:30 +01:00
Mock async_setup_entry in daikin config flow tests (#164371)
This commit is contained in:
@@ -1,7 +1,8 @@
|
||||
"""Tests for the Daikin config flow."""
|
||||
|
||||
from collections.abc import Generator
|
||||
from ipaddress import ip_address
|
||||
from unittest.mock import PropertyMock, patch
|
||||
from unittest.mock import AsyncMock, PropertyMock, patch
|
||||
|
||||
from aiohttp import ClientError, web_exceptions
|
||||
from pydaikin.exceptions import DaikinException
|
||||
@@ -20,6 +21,15 @@ MAC = "AABBCCDDEEFF"
|
||||
HOST = "127.0.0.1"
|
||||
|
||||
|
||||
@pytest.fixture(autouse=True)
|
||||
def mock_setup_entry() -> Generator[AsyncMock]:
|
||||
"""Override async_setup_entry."""
|
||||
with patch(
|
||||
"homeassistant.components.daikin.async_setup_entry", return_value=True
|
||||
) as mock_setup:
|
||||
yield mock_setup
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
def mock_daikin():
|
||||
"""Mock pydaikin."""
|
||||
|
||||
Reference in New Issue
Block a user