Sort imports according to PEP8 for websocket_api (#29657)

This commit is contained in:
Bas Nijholt 2019-12-09 12:30:23 +01:00 committed by Franck Nijhof
parent 16a7408f23
commit 3df40c7a16
5 changed files with 13 additions and 13 deletions

View file

@ -1,9 +1,9 @@
"""Fixtures for websocket tests."""
import pytest
from homeassistant.setup import async_setup_component
from homeassistant.components.websocket_api.http import URL
from homeassistant.components.websocket_api.auth import TYPE_AUTH_REQUIRED
from homeassistant.components.websocket_api.http import URL
from homeassistant.setup import async_setup_component
@pytest.fixture

View file

@ -1,18 +1,17 @@
"""Test auth of websocket API."""
from unittest.mock import patch
from homeassistant.components.websocket_api.const import (
URL,
SIGNAL_WEBSOCKET_CONNECTED,
SIGNAL_WEBSOCKET_DISCONNECTED,
)
from homeassistant.components.websocket_api.auth import (
TYPE_AUTH,
TYPE_AUTH_INVALID,
TYPE_AUTH_OK,
TYPE_AUTH_REQUIRED,
)
from homeassistant.components.websocket_api.const import (
SIGNAL_WEBSOCKET_CONNECTED,
SIGNAL_WEBSOCKET_DISCONNECTED,
URL,
)
from homeassistant.setup import async_setup_component
from tests.common import mock_coro

View file

@ -1,14 +1,14 @@
"""Tests for WebSocket API commands."""
from async_timeout import timeout
from homeassistant.core import callback
from homeassistant.components.websocket_api.const import URL
from homeassistant.components.websocket_api import const
from homeassistant.components.websocket_api.auth import (
TYPE_AUTH,
TYPE_AUTH_OK,
TYPE_AUTH_REQUIRED,
)
from homeassistant.components.websocket_api import const
from homeassistant.components.websocket_api.const import URL
from homeassistant.core import callback
from homeassistant.exceptions import HomeAssistantError
from homeassistant.setup import async_setup_component

View file

@ -1,6 +1,6 @@
"""Tests for the Home Assistant Websocket API."""
import asyncio
from unittest.mock import patch, Mock
from unittest.mock import Mock, patch
from aiohttp import WSMsgType
import pytest

View file

@ -2,9 +2,10 @@
from homeassistant.bootstrap import async_setup_component
from tests.common import assert_setup_component
from .test_auth import test_auth_active_with_token
from tests.common import assert_setup_component
async def test_websocket_api(
hass, no_auth_websocket_client, hass_access_token, legacy_auth