mirror of
https://github.com/home-assistant/core.git
synced 2025-07-10 14:57:09 +00:00
Remove some error prone code from Alexa tests (#76917)
This commit is contained in:
parent
426a620084
commit
d034ed1fc2
@ -26,10 +26,11 @@ from homeassistant.components.media_player.const import (
|
|||||||
)
|
)
|
||||||
import homeassistant.components.vacuum as vacuum
|
import homeassistant.components.vacuum as vacuum
|
||||||
from homeassistant.config import async_process_ha_core_config
|
from homeassistant.config import async_process_ha_core_config
|
||||||
from homeassistant.const import STATE_UNKNOWN, TEMP_CELSIUS, TEMP_FAHRENHEIT
|
from homeassistant.const import STATE_UNKNOWN, TEMP_FAHRENHEIT
|
||||||
from homeassistant.core import Context
|
from homeassistant.core import Context
|
||||||
from homeassistant.helpers import entityfilter
|
from homeassistant.helpers import entityfilter
|
||||||
from homeassistant.setup import async_setup_component
|
from homeassistant.setup import async_setup_component
|
||||||
|
from homeassistant.util.unit_system import IMPERIAL_SYSTEM
|
||||||
|
|
||||||
from .test_common import (
|
from .test_common import (
|
||||||
MockConfig,
|
MockConfig,
|
||||||
@ -2019,7 +2020,7 @@ async def test_unknown_sensor(hass):
|
|||||||
|
|
||||||
async def test_thermostat(hass):
|
async def test_thermostat(hass):
|
||||||
"""Test thermostat discovery."""
|
"""Test thermostat discovery."""
|
||||||
hass.config.units.temperature_unit = TEMP_FAHRENHEIT
|
hass.config.units = IMPERIAL_SYSTEM
|
||||||
device = (
|
device = (
|
||||||
"climate.test_thermostat",
|
"climate.test_thermostat",
|
||||||
"cool",
|
"cool",
|
||||||
@ -2287,9 +2288,6 @@ async def test_thermostat(hass):
|
|||||||
)
|
)
|
||||||
assert call.data["preset_mode"] == "eco"
|
assert call.data["preset_mode"] == "eco"
|
||||||
|
|
||||||
# Reset config temperature_unit back to CELSIUS, required for additional tests outside this component.
|
|
||||||
hass.config.units.temperature_unit = TEMP_CELSIUS
|
|
||||||
|
|
||||||
|
|
||||||
async def test_exclude_filters(hass):
|
async def test_exclude_filters(hass):
|
||||||
"""Test exclusion filters."""
|
"""Test exclusion filters."""
|
||||||
|
Loading…
x
Reference in New Issue
Block a user