2023-08-24 22:48:49 +00:00
|
|
|
"""Common fixtures for the Yardian tests."""
|
2024-03-08 13:44:56 +00:00
|
|
|
|
2023-08-24 22:48:49 +00:00
|
|
|
from unittest.mock import AsyncMock, patch
|
|
|
|
|
|
|
|
import pytest
|
2024-06-06 15:33:27 +00:00
|
|
|
from typing_extensions import Generator
|
2023-08-24 22:48:49 +00:00
|
|
|
|
|
|
|
|
|
|
|
@pytest.fixture
|
2024-06-06 15:33:27 +00:00
|
|
|
def mock_setup_entry() -> Generator[AsyncMock]:
|
2023-08-24 22:48:49 +00:00
|
|
|
"""Override async_setup_entry."""
|
|
|
|
with patch(
|
|
|
|
"homeassistant.components.yardian.async_setup_entry", return_value=True
|
|
|
|
) as mock_setup_entry:
|
|
|
|
yield mock_setup_entry
|