2022-10-10 23:14:27 +00:00
|
|
|
"""Snooz test fixtures and configuration."""
|
|
|
|
from __future__ import annotations
|
|
|
|
|
|
|
|
import pytest
|
|
|
|
|
|
|
|
from homeassistant.core import HomeAssistant
|
|
|
|
|
|
|
|
from . import SnoozFixture, create_mock_snooz, create_mock_snooz_config_entry
|
|
|
|
|
|
|
|
|
|
|
|
@pytest.fixture(autouse=True)
|
|
|
|
def mock_bluetooth(enable_bluetooth):
|
|
|
|
"""Auto mock bluetooth."""
|
|
|
|
|
|
|
|
|
2023-01-26 17:05:05 +00:00
|
|
|
@pytest.fixture
|
2022-10-10 23:14:27 +00:00
|
|
|
async def mock_connected_snooz(hass: HomeAssistant):
|
|
|
|
"""Mock a Snooz configuration entry and device."""
|
|
|
|
|
|
|
|
device = await create_mock_snooz()
|
|
|
|
entry = await create_mock_snooz_config_entry(hass, device)
|
|
|
|
|
2023-01-27 12:57:06 +00:00
|
|
|
return SnoozFixture(entry, device)
|