예제 #1
0
 def setup_method(self, method):
     """Setup things to be run when tests are started."""
     self.hass = get_test_home_assistant()
     self.hass.config.latitude = 32.87336
     self.hass.config.longitude = 117.22743
     self.port = mock.MagicMock()
     self.sensor = mfi.MfiSensor(self.port, self.hass)
예제 #2
0
 def setup_method(self, method):
     """Setup things to be run when tests are started."""
     self.hass = get_test_home_assistant()
     self.port = mock.MagicMock()
     self.sensor = mfi.MfiSensor(self.port, self.hass)
예제 #3
0
 def setup_method(self, method):
     self.hass = ha.HomeAssistant()
     self.hass.config.latitude = 32.87336
     self.hass.config.longitude = 117.22743
     self.port = mock.MagicMock()
     self.sensor = mfi.MfiSensor(self.port, self.hass)