Tests should all use test HA
This commit is contained in:
1 parent
bade0e0d71
commit
09ab3e95c0
52 files changed
+170
-125
No files matched your search
@@ -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