def setup_method(self, method):
     """Set up 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)
Exemple #2
0
def sensor_fixture(hass, port):
    """Sensor fixture."""
    sensor = mfi.MfiSensor(port, hass)
    sensor.hass = hass
    return sensor
def sensor_fixture(hass, port):
    """Sensor fixture."""
    return mfi.MfiSensor(port, hass)