예제 #1
0
 def setUpClass(cls):
     """Setup Light class import and debounce patcher."""
     cls.patcher = patch_debounce()
     cls.patcher.start()
     _import = __import__('homeassistant.components.homekit.type_lights',
                          fromlist=['Light'])
     cls.light_cls = _import.Light
예제 #2
0
 def setUpClass(cls):
     """Setup Light class import and debounce patcher."""
     cls.patcher = patch_debounce()
     cls.patcher.start()
     _import = __import__('homeassistant.components.homekit.type_lights',
                          fromlist=['Light'])
     cls.light_cls = _import.Light
 def setUpClass(cls):
     """Setup Thermostat class import and debounce patcher."""
     cls.patcher = patch_debounce()
     cls.patcher.start()
     _import = __import__(
         'homeassistant.components.homekit.type_thermostats',
         fromlist=['Thermostat'])
     cls.thermostat_cls = _import.Thermostat
예제 #4
0
 def setUpClass(cls):
     """Setup Thermostat class import and debounce patcher."""
     cls.patcher = patch_debounce()
     cls.patcher.start()
     _import = __import__(
         'homeassistant.components.homekit.type_thermostats',
         fromlist=['Thermostat'])
     cls.thermostat_cls = _import.Thermostat
예제 #5
0
def cls():
    """Patch debounce decorator during import of type_fans."""
    patcher = patch_debounce()
    patcher.start()
    _import = __import__('homeassistant.components.homekit.type_fans',
                         fromlist=['Fan'])
    patcher_tuple = namedtuple('Cls', ['fan'])
    yield patcher_tuple(fan=_import.Fan)
    patcher.stop()
예제 #6
0
def cls():
    """Patch debounce decorator during import of type_lights."""
    patcher = patch_debounce()
    patcher.start()
    _import = __import__('homeassistant.components.homekit.type_lights',
                         fromlist=['Light'])
    patcher_tuple = namedtuple('Cls', ['light'])
    yield patcher_tuple(light=_import.Light)
    patcher.stop()
예제 #7
0
 def setUpClass(cls):
     """Setup Light class import and debounce patcher."""
     cls.patcher = patch_debounce()
     cls.patcher.start()
     _import = __import__('homeassistant.components.homekit.type_covers',
                          fromlist=[
                              'GarageDoorOpener', 'WindowCovering,',
                              'WindowCoveringBasic'
                          ])
     cls.garage_cls = _import.GarageDoorOpener
     cls.window_cls = _import.WindowCovering
     cls.window_basic_cls = _import.WindowCoveringBasic
예제 #8
0
def cls():
    """Patch debounce decorator during import of type_covers."""
    patcher = patch_debounce()
    patcher.start()
    _import = __import__('homeassistant.components.homekit.type_covers',
                         fromlist=[
                             'GarageDoorOpener', 'WindowCovering,',
                             'WindowCoveringBasic'
                         ])
    patcher_tuple = namedtuple('Cls', ['window', 'window_basic', 'garage'])
    yield patcher_tuple(window=_import.WindowCovering,
                        window_basic=_import.WindowCoveringBasic,
                        garage=_import.GarageDoorOpener)
    patcher.stop()
예제 #9
0
 def setUpClass(cls):
     """Setup debounce patcher."""
     cls.patcher = patch_debounce()
     cls.patcher.start()
예제 #10
0
 def setUpClass(cls):
     """Setup debounce patcher."""
     cls.patcher = patch_debounce()
     cls.patcher.start()
예제 #11
0
def debounce_patcher(request):
    """Patch debounce method."""
    patcher = patch_debounce()
    patcher.start()
    request.addfinalizer(patcher.stop)