Add missing mock in freedompro config flow tests (#89442)
This commit is contained in:
parent
f3084165b1
commit
3a4ce260b4
2 changed files with 15 additions and 1 deletions
|
@ -1,9 +1,10 @@
|
|||
"""Fixtures for Freedompro integration tests."""
|
||||
from __future__ import annotations
|
||||
|
||||
from collections.abc import Generator
|
||||
from copy import deepcopy
|
||||
from typing import Any
|
||||
from unittest.mock import patch
|
||||
from unittest.mock import AsyncMock, patch
|
||||
|
||||
import pytest
|
||||
|
||||
|
@ -14,6 +15,15 @@ from .const import DEVICES, DEVICES_STATE
|
|||
from tests.common import MockConfigEntry
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
def mock_setup_entry() -> Generator[AsyncMock, None, None]:
|
||||
"""Override async_setup_entry."""
|
||||
with patch(
|
||||
"homeassistant.components.freedompro.async_setup_entry", return_value=True
|
||||
) as mock_setup_entry:
|
||||
yield mock_setup_entry
|
||||
|
||||
|
||||
@pytest.fixture(autouse=True)
|
||||
def mock_freedompro():
|
||||
"""Mock freedompro get_list and get_states."""
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue