1
0
mirror of https://github.com/home-assistant/core.git synced 2026-02-21 02:18:47 +00:00
Files
core/tests/components/analytics/conftest.py
2026-02-18 13:45:45 +01:00

19 lines
504 B
Python

"""Common fixtures for the analytics tests."""
from collections.abc import Generator
from unittest.mock import patch
import pytest
MOCK_SNAPSHOT_PAYLOAD = {"mock_integration": {"devices": [], "entities": []}}
@pytest.fixture
def mock_snapshot_payload() -> Generator[None]:
"""Mock _async_snapshot_payload to return non-empty data."""
with patch(
"homeassistant.components.analytics.analytics._async_snapshot_payload",
return_value=MOCK_SNAPSHOT_PAYLOAD,
):
yield