Move mock_setup_entry to conftest (#88484)
This commit is contained in:
parent
ea4d2bd1e8
commit
bf5f7c53d8
18 changed files with 115 additions and 89 deletions
|
@ -1,7 +1,7 @@
|
|||
"""Fixtures for Samsung TV."""
|
||||
from __future__ import annotations
|
||||
|
||||
from collections.abc import Awaitable, Callable
|
||||
from collections.abc import Awaitable, Callable, Generator
|
||||
from datetime import datetime
|
||||
from socket import AddressFamily
|
||||
from typing import Any
|
||||
|
@ -25,6 +25,15 @@ import homeassistant.util.dt as dt_util
|
|||
from .const import SAMPLE_DEVICE_INFO_UE48JU6400, SAMPLE_DEVICE_INFO_WIFI
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
def mock_setup_entry() -> Generator[AsyncMock, None, None]:
|
||||
"""Override async_setup_entry."""
|
||||
with patch(
|
||||
"homeassistant.components.samsungtv.async_setup_entry", return_value=True
|
||||
) as mock_setup_entry:
|
||||
yield mock_setup_entry
|
||||
|
||||
|
||||
@pytest.fixture(autouse=True)
|
||||
async def silent_ssdp_scanner(hass):
|
||||
"""Start SSDP component and get Scanner, prevent actual SSDP traffic."""
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue