def test_from_config(self): """Config is loaded from dict""" config = Config() config.from_dict({'WORKER_MAX_LOAD': 21}) self.assertEqual(config.WORKER_MAX_LOAD, 21)
def run_scheduler(config): from kuyruk.__main__ import run_scheduler from kuyruk.config import Config c = Config() c.from_dict(config) run_scheduler(Kuyruk(c), None)