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:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user