Sort imports according to PEP8 for ring (#29680)

This commit is contained in:
Bas Nijholt 2019-12-09 11:58:40 +01:00 committed by Franck Nijhof
parent df85a50f3b
commit c7d61279bd
7 changed files with 21 additions and 11 deletions

View File

@ -1,6 +1,6 @@
"""Common methods used across the tests for ring devices.""" """Common methods used across the tests for ring devices."""
from homeassistant.const import CONF_PASSWORD, CONF_USERNAME, CONF_SCAN_INTERVAL
from homeassistant.components.ring import DOMAIN from homeassistant.components.ring import DOMAIN
from homeassistant.const import CONF_PASSWORD, CONF_SCAN_INTERVAL, CONF_USERNAME
from homeassistant.setup import async_setup_component from homeassistant.setup import async_setup_component

View File

@ -1,8 +1,9 @@
"""Configuration for Ring tests.""" """Configuration for Ring tests."""
import requests_mock
import pytest
from tests.common import load_fixture
from asynctest import patch from asynctest import patch
import pytest
import requests_mock
from tests.common import load_fixture
@pytest.fixture(name="ring_mock") @pytest.fixture(name="ring_mock")

View File

@ -1,13 +1,14 @@
"""The tests for the Ring binary sensor platform.""" """The tests for the Ring binary sensor platform."""
import os import os
import unittest import unittest
import requests_mock import requests_mock
from homeassistant.components.ring import binary_sensor as ring
from homeassistant.components import ring as base_ring from homeassistant.components import ring as base_ring
from homeassistant.components.ring import binary_sensor as ring
from tests.components.ring.test_init import ATTRIBUTION, VALID_CONFIG
from tests.common import get_test_config_dir, get_test_home_assistant, load_fixture from tests.common import get_test_config_dir, get_test_home_assistant, load_fixture
from tests.components.ring.test_init import ATTRIBUTION, VALID_CONFIG
class TestRingBinarySensorSetup(unittest.TestCase): class TestRingBinarySensorSetup(unittest.TestCase):

View File

@ -1,9 +1,11 @@
"""The tests for the Ring component.""" """The tests for the Ring component."""
from copy import deepcopy from copy import deepcopy
from datetime import timedelta
import os import os
import unittest import unittest
import requests_mock import requests_mock
from datetime import timedelta
from homeassistant import setup from homeassistant import setup
import homeassistant.components.ring as ring import homeassistant.components.ring as ring

View File

@ -1,8 +1,10 @@
"""The tests for the Ring light platform.""" """The tests for the Ring light platform."""
from homeassistant.components.light import DOMAIN as LIGHT_DOMAIN from homeassistant.components.light import DOMAIN as LIGHT_DOMAIN
from tests.common import load_fixture
from .common import setup_platform from .common import setup_platform
from tests.common import load_fixture
async def test_entity_registry(hass, requests_mock): async def test_entity_registry(hass, requests_mock):
"""Tests that the devices are registed in the entity registry.""" """Tests that the devices are registed in the entity registry."""

View File

@ -1,13 +1,15 @@
"""The tests for the Ring sensor platform.""" """The tests for the Ring sensor platform."""
import os import os
import unittest import unittest
import requests_mock import requests_mock
import homeassistant.components.ring.sensor as ring
from homeassistant.components import ring as base_ring from homeassistant.components import ring as base_ring
import homeassistant.components.ring.sensor as ring
from homeassistant.helpers.icon import icon_for_battery_level from homeassistant.helpers.icon import icon_for_battery_level
from tests.components.ring.test_init import ATTRIBUTION, VALID_CONFIG
from tests.common import get_test_config_dir, get_test_home_assistant, load_fixture from tests.common import get_test_config_dir, get_test_home_assistant, load_fixture
from tests.components.ring.test_init import ATTRIBUTION, VALID_CONFIG
class TestRingSensorSetup(unittest.TestCase): class TestRingSensorSetup(unittest.TestCase):

View File

@ -1,8 +1,10 @@
"""The tests for the Ring switch platform.""" """The tests for the Ring switch platform."""
from homeassistant.components.switch import DOMAIN as SWITCH_DOMAIN from homeassistant.components.switch import DOMAIN as SWITCH_DOMAIN
from tests.common import load_fixture
from .common import setup_platform from .common import setup_platform
from tests.common import load_fixture
async def test_entity_registry(hass, requests_mock): async def test_entity_registry(hass, requests_mock):
"""Tests that the devices are registed in the entity registry.""" """Tests that the devices are registed in the entity registry."""