sort imports according to PEP8 for alexa (#29618)
This commit is contained in:
1 parent
6ad3b6426a
commit
ba34922b03
19 files changed
+72
-68
No files matched your search
@@ -1,8 +1,8 @@
|
||||
"""Tests for the Alexa integration."""
|
||||
from uuid import uuid4
|
||||
|
||||
from homeassistant.core import Context
|
||||
from homeassistant.components.alexa import config, smart_home
|
||||
from homeassistant.core import Context
|
||||
|
||||
from tests.common import async_mock_service
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
"""Test Alexa auth endpoints."""
|
||||
from homeassistant.components.alexa.auth import Auth
|
||||
|
||||
from . import TEST_TOKEN_URL
|
||||
|
||||
|
||||
|
||||
@@ -1,37 +1,38 @@
|
||||
"""Test Alexa capabilities."""
|
||||
import pytest
|
||||
|
||||
from homeassistant.const import (
|
||||
ATTR_UNIT_OF_MEASUREMENT,
|
||||
TEMP_CELSIUS,
|
||||
STATE_LOCKED,
|
||||
STATE_UNLOCKED,
|
||||
STATE_UNKNOWN,
|
||||
STATE_UNAVAILABLE,
|
||||
STATE_ALARM_DISARMED,
|
||||
STATE_ALARM_ARMED_AWAY,
|
||||
STATE_ALARM_ARMED_CUSTOM_BYPASS,
|
||||
STATE_ALARM_ARMED_HOME,
|
||||
STATE_ALARM_ARMED_NIGHT,
|
||||
)
|
||||
from homeassistant.components.climate import const as climate
|
||||
from homeassistant.components.alexa import smart_home
|
||||
from homeassistant.components.alexa.errors import UnsupportedProperty
|
||||
from homeassistant.components.climate import const as climate
|
||||
from homeassistant.components.media_player.const import (
|
||||
SUPPORT_PAUSE,
|
||||
SUPPORT_PLAY,
|
||||
SUPPORT_STOP,
|
||||
)
|
||||
from tests.common import async_mock_service
|
||||
from homeassistant.const import (
|
||||
ATTR_UNIT_OF_MEASUREMENT,
|
||||
STATE_ALARM_ARMED_AWAY,
|
||||
STATE_ALARM_ARMED_CUSTOM_BYPASS,
|
||||
STATE_ALARM_ARMED_HOME,
|
||||
STATE_ALARM_ARMED_NIGHT,
|
||||
STATE_ALARM_DISARMED,
|
||||
STATE_LOCKED,
|
||||
STATE_UNAVAILABLE,
|
||||
STATE_UNKNOWN,
|
||||
STATE_UNLOCKED,
|
||||
TEMP_CELSIUS,
|
||||
)
|
||||
|
||||
from . import (
|
||||
DEFAULT_CONFIG,
|
||||
get_new_request,
|
||||
assert_request_calls_service,
|
||||
assert_request_fails,
|
||||
get_new_request,
|
||||
reported_properties,
|
||||
)
|
||||
|
||||
from tests.common import async_mock_service
|
||||
|
||||
|
||||
@pytest.mark.parametrize("result,adjust", [(25, "-5"), (35, "5"), (0, "-80")])
|
||||
async def test_api_adjust_brightness(hass, result, adjust):
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
"""Test Alexa entity representation."""
|
||||
from homeassistant.components.alexa import smart_home
|
||||
from . import get_new_request, DEFAULT_CONFIG
|
||||
|
||||
from . import DEFAULT_CONFIG, get_new_request
|
||||
|
||||
|
||||
async def test_unsupported_domain(hass):
|
||||
|
||||
@@ -5,10 +5,10 @@ import datetime
|
||||
|
||||
import pytest
|
||||
|
||||
from homeassistant.core import callback
|
||||
from homeassistant.setup import async_setup_component
|
||||
from homeassistant.components import alexa
|
||||
from homeassistant.components.alexa import const
|
||||
from homeassistant.core import callback
|
||||
from homeassistant.setup import async_setup_component
|
||||
|
||||
SESSION_ID = "amzn1.echo-api.session.0000000-0000-0000-0000-00000000000"
|
||||
APPLICATION_ID = "amzn1.echo-sdk-ams.app.000000-d0ed-0000-ad00-000000d00ebe"
|
||||
|
||||
@@ -5,10 +5,10 @@ import json
|
||||
|
||||
import pytest
|
||||
|
||||
from homeassistant.core import callback
|
||||
from homeassistant.setup import async_setup_component
|
||||
from homeassistant.components import alexa
|
||||
from homeassistant.components.alexa import intent
|
||||
from homeassistant.core import callback
|
||||
from homeassistant.setup import async_setup_component
|
||||
|
||||
SESSION_ID = "amzn1.echo-api.session.0000000-0000-0000-0000-00000000000"
|
||||
APPLICATION_ID = "amzn1.echo-sdk-ams.app.000000-d0ed-0000-ad00-000000d00ebe"
|
||||
|
||||
@@ -1,9 +1,7 @@
|
||||
"""Test for smart home alexa support."""
|
||||
import pytest
|
||||
|
||||
from homeassistant.core import Context, callback
|
||||
from homeassistant.const import TEMP_CELSIUS, TEMP_FAHRENHEIT
|
||||
from homeassistant.components.alexa import smart_home, messages
|
||||
from homeassistant.components.alexa import messages, smart_home
|
||||
from homeassistant.components.media_player.const import (
|
||||
SUPPORT_NEXT_TRACK,
|
||||
SUPPORT_PAUSE,
|
||||
@@ -18,22 +16,24 @@ from homeassistant.components.media_player.const import (
|
||||
SUPPORT_VOLUME_MUTE,
|
||||
SUPPORT_VOLUME_SET,
|
||||
)
|
||||
from homeassistant.const import TEMP_CELSIUS, TEMP_FAHRENHEIT
|
||||
from homeassistant.core import Context, callback
|
||||
from homeassistant.helpers import entityfilter
|
||||
|
||||
from tests.common import async_mock_service
|
||||
|
||||
from . import (
|
||||
get_new_request,
|
||||
MockConfig,
|
||||
DEFAULT_CONFIG,
|
||||
assert_request_calls_service,
|
||||
assert_request_fails,
|
||||
MockConfig,
|
||||
ReportedProperties,
|
||||
assert_power_controller_works,
|
||||
assert_request_calls_service,
|
||||
assert_request_fails,
|
||||
assert_scene_controller_works,
|
||||
get_new_request,
|
||||
reported_properties,
|
||||
)
|
||||
|
||||
from tests.common import async_mock_service
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
def events(hass):
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
"""Test Smart Home HTTP endpoints."""
|
||||
import json
|
||||
|
||||
from homeassistant.setup import async_setup_component
|
||||
from homeassistant.components.alexa import DOMAIN, smart_home_http
|
||||
from homeassistant.setup import async_setup_component
|
||||
|
||||
from . import get_new_request
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
"""Test report state."""
|
||||
from homeassistant.components.alexa import state_report
|
||||
from . import TEST_URL, DEFAULT_CONFIG
|
||||
|
||||
from . import DEFAULT_CONFIG, TEST_URL
|
||||
|
||||
|
||||
async def test_report_state(hass, aioclient_mock):
|
||||
|
||||
Reference in new issue
Block a user