core/tests/components/slimproto/conftest.py

33 lines
769 B
Python

"""Fixtures for the SlimProto Player integration tests."""
from __future__ import annotations
from collections.abc import Generator
from unittest.mock import AsyncMock, patch
import pytest
from homeassistant.components.slimproto.const import DOMAIN
from tests.common import MockConfigEntry
@pytest.fixture
def mock_config_entry() -> MockConfigEntry:
"""Return the default mocked config entry."""
return MockConfigEntry(
title="My Radios",
domain=DOMAIN,
data={},
)
@pytest.fixture
def mock_setup_entry() -> Generator[AsyncMock]:
"""Mock setting up a config entry."""
with patch(
"homeassistant.components.slimproto.async_setup_entry",
return_value=True,
) as mock_setup:
yield mock_setup