Files
project-work/home-assistant/tests/components/husqvarna_automower/test_device_tracker.py
2026-11-19 15:15:32 -05:00

32 lines
936 B
Python

"""Tests for the device tracker platform."""
from unittest.mock import AsyncMock, patch
from syrupy import SnapshotAssertion
from homeassistant.const import Platform
from homeassistant.core import HomeAssistant
from homeassistant.helpers import entity_registry as er
from . import setup_integration
from tests.common import MockConfigEntry, snapshot_platform
async def test_device_tracker_snapshot(
hass: HomeAssistant,
entity_registry: er.EntityRegistry,
mock_automower_client: AsyncMock,
mock_config_entry: MockConfigEntry,
snapshot: SnapshotAssertion,
) -> None:
"""Snapshot test of the device tracker."""
with patch(
"homeassistant.components.husqvarna_automower.PLATFORMS",
[Platform.DEVICE_TRACKER],
):
await setup_integration(hass, mock_config_entry)
await snapshot_platform(
hass, entity_registry, snapshot, mock_config_entry.entry_id
)