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 sensor.
|
||||
import unittest
|
||||
import unittest.mock as mock
|
||||
|
||||
import homeassistant.core as ha
|
||||
import homeassistant.components.sensor as sensor
|
||||
import homeassistant.components.sensor.mfi as mfi
|
||||
from homeassistant.const import TEMP_CELCIUS
|
||||
|
||||
from tests.common import get_test_home_assistant
|
||||
|
||||
|
||||
class TestMfiSensorSetup(unittest.TestCase):
|
||||
PLATFORM = mfi
|
||||
@@ -28,7 +29,7 @@ class TestMfiSensorSetup(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
|
||||
|
||||
@@ -87,7 +88,7 @@ class TestMfiSensorSetup(unittest.TestCase):
|
||||
|
||||
class TestMfiSensor(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