1
0
mirror of https://github.com/home-assistant/core.git synced 2025-12-24 21:06:19 +00:00

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,11 +7,12 @@ Tests mFi switch.
import unittest
import unittest.mock as mock
import homeassistant.core as ha
import homeassistant.components.switch as switch
import homeassistant.components.switch.mfi as mfi
from tests.components.sensor import test_mfi as test_mfi_sensor
from tests.common import get_test_home_assistant
class TestMfiSwitchSetup(test_mfi_sensor.TestMfiSensorSetup):
PLATFORM = mfi
@@ -45,7 +46,7 @@ class TestMfiSwitchSetup(test_mfi_sensor.TestMfiSensorSetup):
class TestMfiSwitch(unittest.TestCase):
def setup_method(self, method):
self.hass = ha.HomeAssistant()
self.hass = get_test_home_assistant()
self.hass.config.latitude = 32.87336
self.hass.config.longitude = 117.22743
self.port = mock.MagicMock()