def client(): conf = Config.load(ROOT_CONFIG) app = Application(conf, log_level="ERROR", testing=True) app.config["TESTING"] = True client = app.app.test_client() client.application.redis.flushall() Task.objects.delete() yield client
def auth_client(): conf = Config.load(ROOT_CONFIG) conf.BASIC_AUTH_USERNAME = "******" conf.BASIC_AUTH_PASSWORD = "******" app = Application(conf, log_level="ERROR", testing=True) app.config["TESTING"] = True cli = app.app.test_client() cli.application.redis.flushall() Task.objects.delete() Job.objects.delete() yield cli
def worker(): conf = Config.load(ROOT_CONFIG) app = Application(conf, log_level="ERROR", testing=True) app.config["TESTING"] = True cli = app.app.test_client() cli.application.redis.flushall() Task.objects.delete() Job.objects.delete() worker_instance = WorkerHandler(None, str(uuid4()), True, True, True, True, app.config, 0, app=app) yield worker_instance
def load_config(self): # self.click.echo(f'Loading configuration from {self.config_path}...') self.config = Config.load(self.config_path)
def load_config(self): self.config = Config.load(self.config_path)