* Prelimenary tests for incomfort integration * Use snapshot_platform * Use helper * Ensure the device name is set in device info * Move snapshot tests to platform test modules * Move unused snapshot file * Naming and docstr * update snapshots * cleanup snapshots * Add water heater tests
23 lines
822 B
Python
23 lines
822 B
Python
"""Tests for Intergas InComfort integration."""
|
|
|
|
from unittest.mock import MagicMock, patch
|
|
|
|
from syrupy import SnapshotAssertion
|
|
|
|
from homeassistant.config_entries import ConfigEntry, ConfigEntryState
|
|
from homeassistant.const import Platform
|
|
from homeassistant.core import HomeAssistant
|
|
from homeassistant.helpers import entity_registry as er
|
|
|
|
|
|
@patch("homeassistant.components.incomfort.PLATFORMS", [Platform.SENSOR])
|
|
async def test_setup_platforms(
|
|
hass: HomeAssistant,
|
|
mock_incomfort: MagicMock,
|
|
entity_registry: er.EntityRegistry,
|
|
snapshot: SnapshotAssertion,
|
|
mock_config_entry: ConfigEntry,
|
|
) -> None:
|
|
"""Test the incomfort integration is set up correctly."""
|
|
await hass.config_entries.async_setup(mock_config_entry.entry_id)
|
|
assert mock_config_entry.state is ConfigEntryState.LOADED
|