Nicer test imports

unittest changes import path so old style worked but is confusing
This commit is contained in:
Paulus Schoutsen 2015-08-04 18:15:22 +02:00
parent 14023a15e6
commit df3ee6005a
9 changed files with 9 additions and 9 deletions

View File

@ -9,7 +9,7 @@ import unittest
import homeassistant as ha
import homeassistant.components.demo as demo
from common import mock_http_component
from tests.common import mock_http_component
class TestDemo(unittest.TestCase):

View File

@ -14,7 +14,7 @@ from homeassistant.components import (
device_tracker, light, sun, device_sun_light_trigger)
from common import (
from tests.common import (
get_test_home_assistant, ensure_sun_risen, ensure_sun_set,
trigger_device_tracker_scan)

View File

@ -18,7 +18,7 @@ from homeassistant.const import (
DEVICE_DEFAULT_NAME)
import homeassistant.components.device_tracker as device_tracker
from common import get_test_home_assistant
from tests.common import get_test_home_assistant
def setUpModule(): # pylint: disable=invalid-name

View File

@ -13,7 +13,7 @@ import homeassistant as ha
import homeassistant.util.dt as dt_util
from homeassistant.components import history, recorder
from common import (
from tests.common import (
mock_http_component, mock_state_change_event, get_test_home_assistant)

View File

@ -15,7 +15,7 @@ from homeassistant.const import (
SERVICE_TURN_ON, SERVICE_TURN_OFF)
import homeassistant.components.light as light
from common import mock_service, get_test_home_assistant
from tests.common import mock_service, get_test_home_assistant
class TestLight(unittest.TestCase):

View File

@ -14,7 +14,7 @@ from homeassistant.const import (
import homeassistant.util.dt as dt_util
from homeassistant.components import logbook
from common import get_test_home_assistant, mock_http_component
from tests.common import get_test_home_assistant, mock_http_component
class TestComponentHistory(unittest.TestCase):

View File

@ -15,7 +15,7 @@ from homeassistant.const import (
SERVICE_MEDIA_PLAY_PAUSE, SERVICE_MEDIA_PLAY, SERVICE_MEDIA_PAUSE,
SERVICE_MEDIA_NEXT_TRACK, SERVICE_MEDIA_PREVIOUS_TRACK, ATTR_ENTITY_ID)
import homeassistant.components.media_player as media_player
from common import mock_service
from tests.common import mock_service
def setUpModule(): # pylint: disable=invalid-name

View File

@ -11,7 +11,7 @@ import os
from homeassistant.const import MATCH_ALL
from homeassistant.components import recorder
from common import get_test_home_assistant
from tests.common import get_test_home_assistant
class TestRecorder(unittest.TestCase):

View File

@ -11,7 +11,7 @@ import homeassistant.loader as loader
from homeassistant.const import STATE_ON, STATE_OFF, CONF_PLATFORM
import homeassistant.components.switch as switch
from common import get_test_home_assistant
from tests.common import get_test_home_assistant
class TestSwitch(unittest.TestCase):