Add missing mock in wiffi tests (#93083)

This commit is contained in:
epenet 2023-05-15 11:15:19 +02:00 committed by GitHub
parent 01dc27e2a2
commit 48ab74eedf
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 16 additions and 0 deletions

View 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

View file

@ -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():