move imports in statsd component (#27649)

pull/27672/head
Michał Mrozek 2019-10-14 23:19:37 +02:00 committed by Paulus Schoutsen
parent a49dbb9718
commit bcb14182c6
2 changed files with 6 additions and 6 deletions

View File

@ -1,11 +1,12 @@
"""Support for sending data to StatsD."""
import logging
import statsd
import voluptuous as vol
from homeassistant.const import CONF_HOST, CONF_PORT, CONF_PREFIX, EVENT_STATE_CHANGED
import homeassistant.helpers.config_validation as cv
from homeassistant.helpers import state as state_helper
import homeassistant.helpers.config_validation as cv
_LOGGER = logging.getLogger(__name__)
@ -40,7 +41,6 @@ CONFIG_SCHEMA = vol.Schema(
def setup(hass, config):
"""Set up the StatsD component."""
import statsd
conf = config[DOMAIN]
host = conf.get(CONF_HOST)

View File

@ -2,15 +2,15 @@
import unittest
from unittest import mock
import pytest
import voluptuous as vol
from homeassistant.setup import setup_component
import homeassistant.core as ha
import homeassistant.components.statsd as statsd
from homeassistant.const import STATE_ON, STATE_OFF, EVENT_STATE_CHANGED
from homeassistant.const import EVENT_STATE_CHANGED, STATE_OFF, STATE_ON
import homeassistant.core as ha
from homeassistant.setup import setup_component
from tests.common import get_test_home_assistant
import pytest
class TestStatsd(unittest.TestCase):