Add snapshot tests to Netatmo platforms (#107932)

* Add snapshot tests to Netatmo platforms

* Add snapshot tests to Netatmo platforms
This commit is contained in:
Joost Lekkerkerker 2024-01-13 10:18:21 +01:00 committed by GitHub
parent 0458bd68d9
commit 902619a4db
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
15 changed files with 7211 additions and 10 deletions

View file

@ -1,6 +1,8 @@
"""The tests for Netatmo cover."""
from unittest.mock import AsyncMock, patch
from syrupy import SnapshotAssertion
from homeassistant.components.cover import (
ATTR_POSITION,
DOMAIN as COVER_DOMAIN,
@ -11,12 +13,30 @@ from homeassistant.components.cover import (
)
from homeassistant.const import ATTR_ENTITY_ID, Platform
from homeassistant.core import HomeAssistant
import homeassistant.helpers.entity_registry as er
from .common import selected_platforms
from .common import selected_platforms, snapshot_platform_entities
from tests.common import MockConfigEntry
async def test_entity(
hass: HomeAssistant,
config_entry: MockConfigEntry,
netatmo_auth: AsyncMock,
snapshot: SnapshotAssertion,
entity_registry: er.EntityRegistry,
) -> None:
"""Test entities."""
await snapshot_platform_entities(
hass,
config_entry,
Platform.COVER,
entity_registry,
snapshot,
)
async def test_cover_setup_and_services(
hass: HomeAssistant, config_entry: MockConfigEntry, netatmo_auth: AsyncMock
) -> None: