mirror of
https://github.com/home-assistant/core.git
synced 2025-12-24 21:06:19 +00:00
Use US_CUSTOMARY_SYSTEM in tests (#80658)
* Use US_CUSTOMARY_SYSTEM in tests * Don't update test_unit_system
This commit is contained in:
@@ -17,7 +17,7 @@ from homeassistant.components.repairs import DOMAIN as REPAIRS_DOMAIN
|
||||
from homeassistant.helpers.json import JSONEncoder
|
||||
from homeassistant.setup import async_setup_component
|
||||
import homeassistant.util.dt as dt_util
|
||||
from homeassistant.util.unit_system import IMPERIAL_SYSTEM
|
||||
from homeassistant.util.unit_system import US_CUSTOMARY_SYSTEM
|
||||
|
||||
from tests.components.recorder.common import async_wait_recording_done
|
||||
|
||||
@@ -84,7 +84,7 @@ async def test_demo_statistics(recorder_mock, mock_history, hass):
|
||||
|
||||
async def test_demo_statistics_growth(recorder_mock, mock_history, hass):
|
||||
"""Test that the demo sum statistics adds to the previous state."""
|
||||
hass.config.units = IMPERIAL_SYSTEM
|
||||
hass.config.units = US_CUSTOMARY_SYSTEM
|
||||
|
||||
now = dt_util.now()
|
||||
last_week = now - datetime.timedelta(days=7)
|
||||
|
||||
@@ -4,7 +4,7 @@ import voluptuous as vol
|
||||
|
||||
from homeassistant.components import water_heater
|
||||
from homeassistant.setup import async_setup_component
|
||||
from homeassistant.util.unit_system import IMPERIAL_SYSTEM
|
||||
from homeassistant.util.unit_system import US_CUSTOMARY_SYSTEM
|
||||
|
||||
from tests.components.water_heater import common
|
||||
|
||||
@@ -15,7 +15,7 @@ ENTITY_WATER_HEATER_CELSIUS = "water_heater.demo_water_heater_celsius"
|
||||
@pytest.fixture(autouse=True)
|
||||
async def setup_comp(hass):
|
||||
"""Set up demo component."""
|
||||
hass.config.units = IMPERIAL_SYSTEM
|
||||
hass.config.units = US_CUSTOMARY_SYSTEM
|
||||
assert await async_setup_component(
|
||||
hass, water_heater.DOMAIN, {"water_heater": {"platform": "demo"}}
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user