Sort imports according to PEP8 for components starting with "P" (#29775)

This commit is contained in:
Bas Nijholt
2019-12-09 14:29:39 +01:00
committed by Franck Nijhof
parent 5cdaff5405
commit 21816eeed4
25 changed files with 73 additions and 78 deletions
@@ -1,7 +1,7 @@
"""The tests for the persistent notification component."""
from homeassistant.components.websocket_api.const import TYPE_RESULT
from homeassistant.setup import setup_component, async_setup_component
import homeassistant.components.persistent_notification as pn
from homeassistant.components.websocket_api.const import TYPE_RESULT
from homeassistant.setup import async_setup_component, setup_component
from tests.common import get_test_home_assistant
+10 -10
View File
@@ -1,23 +1,23 @@
"""Unit tests for platform/plant.py."""
import asyncio
import unittest
import pytest
from datetime import datetime, timedelta
import unittest
import pytest
from homeassistant.const import (
ATTR_UNIT_OF_MEASUREMENT,
STATE_UNAVAILABLE,
STATE_UNKNOWN,
STATE_PROBLEM,
STATE_OK,
)
from homeassistant.components import recorder
import homeassistant.components.plant as plant
from homeassistant.const import (
ATTR_UNIT_OF_MEASUREMENT,
STATE_OK,
STATE_PROBLEM,
STATE_UNAVAILABLE,
STATE_UNKNOWN,
)
from homeassistant.setup import setup_component
from tests.common import get_test_home_assistant, init_recorder_component
GOOD_DATA = {
"moisture": 50,
"battery": 90,
+3 -3
View File
@@ -1,14 +1,14 @@
"""The tests for the Prometheus exporter."""
import asyncio
import pytest
from homeassistant.const import ENERGY_KILO_WATT_HOUR, DEVICE_CLASS_POWER
import pytest
from homeassistant import setup
from homeassistant.components import climate, sensor
from homeassistant.components.demo.sensor import DemoSensor
from homeassistant.setup import async_setup_component
import homeassistant.components.prometheus as prometheus
from homeassistant.const import DEVICE_CLASS_POWER, ENERGY_KILO_WATT_HOUR
from homeassistant.setup import async_setup_component
@pytest.fixture
+1 -1
View File
@@ -3,8 +3,8 @@ import unittest
from homeassistant.components import proximity
from homeassistant.components.proximity import DOMAIN
from homeassistant.setup import setup_component
from tests.common import get_test_home_assistant
+2 -1
View File
@@ -26,8 +26,9 @@ from homeassistant.const import (
CONF_TOKEN,
)
from homeassistant.exceptions import HomeAssistantError
from homeassistant.util import location
from homeassistant.setup import async_setup_component
from homeassistant.util import location
from tests.common import MockConfigEntry, mock_coro, mock_registry
MOCK_HOST = "192.168.0.1"
+2 -2
View File
@@ -29,13 +29,13 @@ from homeassistant.const import (
CONF_REGION,
CONF_TOKEN,
STATE_IDLE,
STATE_STANDBY,
STATE_PLAYING,
STATE_STANDBY,
STATE_UNKNOWN,
)
from homeassistant.setup import async_setup_component
from tests.common import MockConfigEntry, mock_device_registry, mock_registry, mock_coro
from tests.common import MockConfigEntry, mock_coro, mock_device_registry, mock_registry
MOCK_CREDS = "123412341234abcd12341234abcd12341234abcd12341234abcd12341234abcd"
MOCK_NAME = "ha_ps4_name"
+2 -1
View File
@@ -1,12 +1,13 @@
"""Tests for PTVSD Debugger."""
from unittest.mock import patch
from asynctest import CoroutineMock
from pytest import mark
from homeassistant.bootstrap import _async_set_up_integrations
import homeassistant.components.ptvsd as ptvsd_component
from homeassistant.setup import async_setup_component
from homeassistant.bootstrap import _async_set_up_integrations
@mark.skip("causes code cover to fail")
+1 -2
View File
@@ -1,7 +1,6 @@
"""The tests for generic camera component."""
import io
from datetime import timedelta
import io
from homeassistant import core as ha
from homeassistant.setup import async_setup_component
+2 -2
View File
@@ -1,11 +1,11 @@
"""Test the python_script component."""
import asyncio
import logging
from unittest.mock import patch, mock_open
from unittest.mock import mock_open, patch
from homeassistant.components.python_script import DOMAIN, FOLDER, execute
from homeassistant.helpers.service import async_get_all_descriptions
from homeassistant.setup import async_setup_component
from homeassistant.components.python_script import DOMAIN, execute, FOLDER
from tests.common import patch_yaml_files