mirror of
https://github.com/home-assistant/core.git
synced 2025-07-24 21:57:51 +00:00
Migrate lg_thinq tests to use unit system (#140365)
This commit is contained in:
parent
7826bb9323
commit
daaa1486fc
@ -5,9 +5,10 @@ from unittest.mock import AsyncMock, patch
|
|||||||
import pytest
|
import pytest
|
||||||
from syrupy import SnapshotAssertion
|
from syrupy import SnapshotAssertion
|
||||||
|
|
||||||
from homeassistant.const import Platform, UnitOfTemperature
|
from homeassistant.const import Platform
|
||||||
from homeassistant.core import HomeAssistant
|
from homeassistant.core import HomeAssistant
|
||||||
from homeassistant.helpers import entity_registry as er
|
from homeassistant.helpers import entity_registry as er
|
||||||
|
from homeassistant.util.unit_system import US_CUSTOMARY_SYSTEM
|
||||||
|
|
||||||
from . import setup_integration
|
from . import setup_integration
|
||||||
|
|
||||||
@ -23,7 +24,7 @@ async def test_all_entities(
|
|||||||
entity_registry: er.EntityRegistry,
|
entity_registry: er.EntityRegistry,
|
||||||
) -> None:
|
) -> None:
|
||||||
"""Test all entities."""
|
"""Test all entities."""
|
||||||
hass.config.units.temperature_unit = UnitOfTemperature.FAHRENHEIT
|
hass.config.units = US_CUSTOMARY_SYSTEM
|
||||||
with patch("homeassistant.components.lg_thinq.PLATFORMS", [Platform.CLIMATE]):
|
with patch("homeassistant.components.lg_thinq.PLATFORMS", [Platform.CLIMATE]):
|
||||||
await setup_integration(hass, mock_config_entry)
|
await setup_integration(hass, mock_config_entry)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user