Tests should all use test HA

This commit is contained in:
Paulus Schoutsen 2016-02-14 15:08:23 -08:00
parent bade0e0d71
commit 09ab3e95c0
52 changed files with 170 additions and 125 deletions

View file

@ -7,16 +7,16 @@ Tests MQTT switch.
import unittest
from homeassistant.const import STATE_ON, STATE_OFF
import homeassistant.core as ha
import homeassistant.components.switch as switch
from tests.common import mock_mqtt_component, fire_mqtt_message
from tests.common import (
mock_mqtt_component, fire_mqtt_message, get_test_home_assistant)
class TestSensorMQTT(unittest.TestCase):
""" Test the MQTT switch. """
def setUp(self): # pylint: disable=invalid-name
self.hass = ha.HomeAssistant()
self.hass = get_test_home_assistant()
self.mock_publish = mock_mqtt_component(self.hass)
def tearDown(self): # pylint: disable=invalid-name