mirror of
https://github.com/home-assistant/core.git
synced 2026-07-03 04:36:04 +01:00
876ffe3b6c
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
33 lines
800 B
Python
33 lines
800 B
Python
"""Chef iQ test fixtures."""
|
|
|
|
from collections.abc import Generator
|
|
from unittest.mock import AsyncMock, patch
|
|
|
|
import pytest
|
|
|
|
from homeassistant.components.chef_iq.const import DOMAIN
|
|
|
|
from . import ADDRESS
|
|
|
|
from tests.common import MockConfigEntry
|
|
|
|
|
|
@pytest.fixture(autouse=True)
|
|
def mock_bluetooth(enable_bluetooth: None) -> None:
|
|
"""Auto-enable Bluetooth for all tests."""
|
|
|
|
|
|
@pytest.fixture
|
|
def mock_setup_entry() -> Generator[AsyncMock]:
|
|
"""Override async_setup_entry."""
|
|
with patch(
|
|
"homeassistant.components.chef_iq.async_setup_entry", return_value=True
|
|
) as mock_setup_entry:
|
|
yield mock_setup_entry
|
|
|
|
|
|
@pytest.fixture
|
|
def mock_config_entry() -> MockConfigEntry:
|
|
"""Return a mock config entry."""
|
|
return MockConfigEntry(domain=DOMAIN, unique_id=ADDRESS)
|