Add missing mock in wiffi tests (#93083)
This commit is contained in:
parent
01dc27e2a2
commit
48ab74eedf
2 changed files with 16 additions and 0 deletions
14
tests/components/wiffi/conftest.py
Normal file
14
tests/components/wiffi/conftest.py
Normal file
|
@ -0,0 +1,14 @@
|
|||
"""Configuration for Wiffi tests."""
|
||||
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.wiffi.async_setup_entry", return_value=True
|
||||
) as mock_setup_entry:
|
||||
yield mock_setup_entry
|
|
@ -14,6 +14,8 @@ from tests.common import MockConfigEntry
|
|||
|
||||
MOCK_CONFIG = {CONF_PORT: 8765}
|
||||
|
||||
pytestmark = pytest.mark.usefixtures("mock_setup_entry")
|
||||
|
||||
|
||||
@pytest.fixture(name="dummy_tcp_server")
|
||||
def mock_dummy_tcp_server():
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue