1
mirror of https://github.com/home-assistant/core synced 2024-09-09 12:51:22 +02:00

Adjust root-import in google-assistant tests (#78768)

This commit is contained in:
epenet 2022-09-19 15:40:56 +02:00 committed by GitHub
parent 52a377ca9d
commit 7ffac12de7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 20 additions and 20 deletions

View File

@ -10,16 +10,16 @@ import pytest
from homeassistant import const, core, setup
from homeassistant.components import (
alarm_control_panel,
climate,
cover,
fan,
google_assistant as ga,
humidifier,
light,
lock,
media_player,
switch,
)
from homeassistant.components.climate import const as climate
from homeassistant.components.humidifier import const as humidifier
from homeassistant.const import CLOUD_NEVER_EXPOSED_ENTITIES
from homeassistant.helpers import entity_registry as er
from homeassistant.helpers.entity import EntityCategory

View File

@ -9,9 +9,11 @@ from homeassistant.components import (
binary_sensor,
button,
camera,
climate,
cover,
fan,
group,
humidifier,
input_boolean,
input_button,
input_select,
@ -25,10 +27,8 @@ from homeassistant.components import (
switch,
vacuum,
)
from homeassistant.components.climate import const as climate
from homeassistant.components.google_assistant import const, error, helpers, trait
from homeassistant.components.google_assistant.error import SmartHomeError
from homeassistant.components.humidifier import const as humidifier
from homeassistant.components.media_player.const import (
MEDIA_TYPE_CHANNEL,
SERVICE_PLAY_MEDIA,
@ -842,14 +842,14 @@ async def test_temperature_setting_climate_onoff(hass):
hass,
State(
"climate.bla",
climate.HVAC_MODE_AUTO,
climate.HVACMode.AUTO,
{
ATTR_SUPPORTED_FEATURES: climate.SUPPORT_TARGET_TEMPERATURE_RANGE,
climate.ATTR_HVAC_MODES: [
climate.HVAC_MODE_OFF,
climate.HVAC_MODE_COOL,
climate.HVAC_MODE_HEAT,
climate.HVAC_MODE_HEAT_COOL,
climate.HVACMode.OFF,
climate.HVACMode.COOL,
climate.HVACMode.HEAT,
climate.HVACMode.HEAT_COOL,
],
climate.ATTR_MIN_TEMP: None,
climate.ATTR_MAX_TEMP: None,
@ -887,7 +887,7 @@ async def test_temperature_setting_climate_no_modes(hass):
hass,
State(
"climate.bla",
climate.HVAC_MODE_AUTO,
climate.HVACMode.AUTO,
{
climate.ATTR_HVAC_MODES: [],
climate.ATTR_MIN_TEMP: None,
@ -913,16 +913,16 @@ async def test_temperature_setting_climate_range(hass):
hass,
State(
"climate.bla",
climate.HVAC_MODE_AUTO,
climate.HVACMode.AUTO,
{
climate.ATTR_CURRENT_TEMPERATURE: 70,
climate.ATTR_CURRENT_HUMIDITY: 25,
ATTR_SUPPORTED_FEATURES: climate.SUPPORT_TARGET_TEMPERATURE_RANGE,
climate.ATTR_HVAC_MODES: [
STATE_OFF,
climate.HVAC_MODE_COOL,
climate.HVAC_MODE_HEAT,
climate.HVAC_MODE_AUTO,
climate.HVACMode.COOL,
climate.HVACMode.HEAT,
climate.HVACMode.AUTO,
],
climate.ATTR_TARGET_TEMP_HIGH: 75,
climate.ATTR_TARGET_TEMP_LOW: 65,
@ -970,7 +970,7 @@ async def test_temperature_setting_climate_range(hass):
assert len(calls) == 1
assert calls[0].data == {
ATTR_ENTITY_ID: "climate.bla",
climate.ATTR_HVAC_MODE: climate.HVAC_MODE_COOL,
climate.ATTR_HVAC_MODE: climate.HVACMode.COOL,
}
with pytest.raises(helpers.SmartHomeError) as err:
@ -995,9 +995,9 @@ async def test_temperature_setting_climate_setpoint(hass):
hass,
State(
"climate.bla",
climate.HVAC_MODE_COOL,
climate.HVACMode.COOL,
{
climate.ATTR_HVAC_MODES: [STATE_OFF, climate.HVAC_MODE_COOL],
climate.ATTR_HVAC_MODES: [STATE_OFF, climate.HVACMode.COOL],
climate.ATTR_MIN_TEMP: 10,
climate.ATTR_MAX_TEMP: 30,
ATTR_TEMPERATURE: 18,
@ -1050,11 +1050,11 @@ async def test_temperature_setting_climate_setpoint_auto(hass):
hass,
State(
"climate.bla",
climate.HVAC_MODE_HEAT_COOL,
climate.HVACMode.HEAT_COOL,
{
climate.ATTR_HVAC_MODES: [
climate.HVAC_MODE_OFF,
climate.HVAC_MODE_HEAT_COOL,
climate.HVACMode.OFF,
climate.HVACMode.HEAT_COOL,
],
climate.ATTR_MIN_TEMP: 10,
climate.ATTR_MAX_TEMP: 30,