2024-01-23 11:18:31 +00:00
|
|
|
"""Fixtures for Time & Date integration tests."""
|
2024-03-08 13:44:56 +00:00
|
|
|
|
2024-07-01 09:54:42 +00:00
|
|
|
from collections.abc import Generator
|
2024-01-23 11:18:31 +00:00
|
|
|
from unittest.mock import AsyncMock, patch
|
|
|
|
|
|
|
|
import pytest
|
|
|
|
|
|
|
|
|
|
|
|
@pytest.fixture
|
2024-06-06 15:33:27 +00:00
|
|
|
def mock_setup_entry() -> Generator[AsyncMock]:
|
2024-01-23 11:18:31 +00:00
|
|
|
"""Mock setting up a config entry."""
|
|
|
|
with patch(
|
|
|
|
"homeassistant.components.time_date.async_setup_entry", return_value=True
|
|
|
|
) as mock_setup:
|
|
|
|
yield mock_setup
|