use isort to sort imports according to PEP8 for cloud (#29626)
This commit is contained in:
1 parent
e4e9cdce73
commit
fbd4cf1089
17 files changed
+71
-71
No files matched your search
@@ -1,9 +1,9 @@
|
||||
"""Tests for the cloud component."""
|
||||
from unittest.mock import patch
|
||||
|
||||
from homeassistant.setup import async_setup_component
|
||||
from homeassistant.components import cloud
|
||||
from homeassistant.components.cloud import const
|
||||
from homeassistant.setup import async_setup_component
|
||||
|
||||
from tests.common import mock_coro
|
||||
|
||||
|
||||
@@ -6,12 +6,12 @@ from unittest.mock import Mock, patch
|
||||
|
||||
import pytest
|
||||
|
||||
from homeassistant import data_entry_flow, config_entries
|
||||
from homeassistant.helpers import config_entry_oauth2_flow
|
||||
from homeassistant import config_entries, data_entry_flow
|
||||
from homeassistant.components.cloud import account_link
|
||||
from homeassistant.helpers import config_entry_oauth2_flow
|
||||
from homeassistant.util.dt import utcnow
|
||||
from tests.common import mock_coro, async_fire_time_changed, mock_platform
|
||||
|
||||
from tests.common import async_fire_time_changed, mock_coro, mock_platform
|
||||
|
||||
TEST_DOMAIN = "oauth2_test"
|
||||
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
"""Test Alexa config."""
|
||||
import contextlib
|
||||
from unittest.mock import patch, Mock
|
||||
from unittest.mock import Mock, patch
|
||||
|
||||
from homeassistant.components.cloud import ALEXA_SCHEMA, alexa_config
|
||||
from homeassistant.util.dt import utcnow
|
||||
from homeassistant.helpers.entity_registry import EVENT_ENTITY_REGISTRY_UPDATED
|
||||
from tests.common import mock_coro, async_fire_time_changed
|
||||
from homeassistant.util.dt import utcnow
|
||||
|
||||
from tests.common import async_fire_time_changed, mock_coro
|
||||
|
||||
|
||||
async def test_alexa_config_expose_entity_prefs(hass, cloud_prefs):
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
"""Tests for the cloud binary sensor."""
|
||||
from unittest.mock import Mock
|
||||
|
||||
from homeassistant.setup import async_setup_component
|
||||
from homeassistant.components.cloud.const import DISPATCHER_REMOTE_UPDATE
|
||||
from homeassistant.setup import async_setup_component
|
||||
|
||||
|
||||
async def test_remote_connection_sensor(hass):
|
||||
|
||||
@@ -1,18 +1,19 @@
|
||||
"""Test the cloud.iot module."""
|
||||
from unittest.mock import patch, MagicMock
|
||||
from unittest.mock import MagicMock, patch
|
||||
|
||||
from aiohttp import web
|
||||
import pytest
|
||||
|
||||
from homeassistant.core import State
|
||||
from homeassistant.setup import async_setup_component
|
||||
from homeassistant.components.cloud import DOMAIN
|
||||
from homeassistant.components.cloud.client import CloudClient
|
||||
from homeassistant.components.cloud.const import PREF_ENABLE_ALEXA, PREF_ENABLE_GOOGLE
|
||||
from tests.components.alexa import test_smart_home as test_alexa
|
||||
from tests.common import mock_coro
|
||||
from homeassistant.core import State
|
||||
from homeassistant.setup import async_setup_component
|
||||
|
||||
from . import mock_cloud_prefs, mock_cloud
|
||||
from . import mock_cloud, mock_cloud_prefs
|
||||
|
||||
from tests.common import mock_coro
|
||||
from tests.components.alexa import test_smart_home as test_alexa
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
"""Test the Cloud Google Config."""
|
||||
from unittest.mock import patch, Mock
|
||||
from unittest.mock import Mock, patch
|
||||
|
||||
from homeassistant.components.google_assistant import helpers as ga_helpers
|
||||
from homeassistant.components.cloud import GACTIONS_SCHEMA
|
||||
from homeassistant.components.cloud.google_config import CloudGoogleConfig
|
||||
from homeassistant.util.dt import utcnow
|
||||
from homeassistant.components.google_assistant import helpers as ga_helpers
|
||||
from homeassistant.helpers.entity_registry import EVENT_ENTITY_REGISTRY_UPDATED
|
||||
from homeassistant.util.dt import utcnow
|
||||
|
||||
from tests.common import mock_coro, async_fire_time_changed
|
||||
from tests.common import async_fire_time_changed, mock_coro
|
||||
|
||||
|
||||
async def test_google_update_report_state(hass, cloud_prefs):
|
||||
|
||||
@@ -1,26 +1,26 @@
|
||||
"""Tests for the HTTP API for the cloud component."""
|
||||
import asyncio
|
||||
from unittest.mock import patch, MagicMock
|
||||
from ipaddress import ip_network
|
||||
from unittest.mock import MagicMock, patch
|
||||
|
||||
import pytest
|
||||
from jose import jwt
|
||||
from hass_nabucasa import thingtalk
|
||||
from hass_nabucasa.auth import Unauthenticated, UnknownError
|
||||
from hass_nabucasa.const import STATE_CONNECTED
|
||||
from hass_nabucasa import thingtalk
|
||||
from jose import jwt
|
||||
import pytest
|
||||
|
||||
from homeassistant.core import State
|
||||
from homeassistant.auth.providers import trusted_networks as tn_auth
|
||||
from homeassistant.components.alexa import errors as alexa_errors
|
||||
from homeassistant.components.alexa.entities import LightCapabilities
|
||||
from homeassistant.components.cloud.const import DOMAIN, RequireRelink
|
||||
from homeassistant.components.google_assistant.helpers import GoogleEntity
|
||||
from homeassistant.components.alexa.entities import LightCapabilities
|
||||
from homeassistant.components.alexa import errors as alexa_errors
|
||||
from homeassistant.core import State
|
||||
|
||||
from . import mock_cloud, mock_cloud_prefs
|
||||
|
||||
from tests.common import mock_coro
|
||||
from tests.components.google_assistant import MockConfig
|
||||
|
||||
from . import mock_cloud, mock_cloud_prefs
|
||||
|
||||
GOOGLE_ACTIONS_SYNC_URL = "https://api-test.hass.io/google_actions_sync"
|
||||
SUBSCRIPTION_INFO_URL = "https://api-test.hass.io/subscription_info"
|
||||
|
||||
|
||||
@@ -3,13 +3,14 @@ from unittest.mock import patch
|
||||
|
||||
import pytest
|
||||
|
||||
from homeassistant.core import Context
|
||||
from homeassistant.exceptions import Unauthorized
|
||||
from homeassistant.components import cloud
|
||||
from homeassistant.components.cloud.const import DOMAIN
|
||||
from homeassistant.components.cloud.prefs import STORAGE_KEY
|
||||
from homeassistant.const import EVENT_HOMEASSISTANT_START, EVENT_HOMEASSISTANT_STOP
|
||||
from homeassistant.core import Context
|
||||
from homeassistant.exceptions import Unauthorized
|
||||
from homeassistant.setup import async_setup_component
|
||||
|
||||
from tests.common import mock_coro
|
||||
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
from unittest.mock import patch
|
||||
|
||||
from homeassistant.auth.const import GROUP_ID_ADMIN
|
||||
from homeassistant.components.cloud.prefs import CloudPreferences, STORAGE_KEY
|
||||
from homeassistant.components.cloud.prefs import STORAGE_KEY, CloudPreferences
|
||||
|
||||
|
||||
async def test_set_username(hass):
|
||||
|
||||
Reference in new issue
Block a user