mirror of
https://github.com/home-assistant/core.git
synced 2025-07-19 11:17:21 +00:00
Sort imports according to PEP8 for ring (#29680)
This commit is contained in:
parent
df85a50f3b
commit
c7d61279bd
@ -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
|
||||||
|
|
||||||
|
|
||||||
|
@ -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")
|
||||||
|
@ -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):
|
||||||
|
@ -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
|
||||||
|
|
||||||
|
@ -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."""
|
||||||
|
@ -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):
|
||||||
|
@ -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."""
|
||||||
|
Loading…
x
Reference in New Issue
Block a user