def test_log_config(self, info, basic_config):
     log_config.configure()
     self.assertTrue(basic_config.called)
     self.assertTrue(info.called)
     basic_config.assert_called_with(
         filename=log_config.logging_defaults['log_file_name'],
         level=logging.DEBUG,
         format='lf',
         datefmt='ldf')
     info.assert_called()
Beispiel #2
0
def configure():
    injection.configure()
    settings.use_base({
        'log_level': logging.ERROR,
        'log_to_console': True,
        'single_light_discover': True,
        'use_fakes': True
    }).configure()
    log_config.configure()
    fake_clock.configure()
    fake_lifx.configure()
    light_set.configure()
Beispiel #3
0
def configure():
    """ Assumes injection and settings are already initialized. """
    log_config.configure()
    clock.configure()

    settings = provide(Settings)
    if settings.get_value('use_fakes'):
        from ..fakes import fake_lifx
        fake_lifx.configure()
    else:
        from . import lifx
        lifx.configure()

    light_set.configure()