def setUp(self): self.app = create_app("test") self.app.config["TESTING"] = True self.app.config["SERVER_NAME"] = "localhost" self.app_context = self.app.app_context() self.app_context.push() self.client = self.app.test_client()
def setUp(self): self.app = create_app("test") self.app.config["TESTING"] = True self.app.config["SERVER_NAME"] = "localhost" self.app_context = self.app.app_context() self.app_context.push() self.client = self.app.test_client() self.schema = AssessmentIndicatorResultSchema()
def setUp(self): self.app = create_app("test") self.app.config["TESTING"] = True self.app.config["SERVER_NAME"] = "localhost" self.app_context = self.app.app_context() self.app_context.push() self.client = self.app.test_client() db.create_all() self.assessment_result1 = { "request_id": uuid.uuid4(), } self.assessment_result2 = { "request_id": uuid.uuid4(), } self.assessment_result3 = { "request_id": uuid.uuid4(), }
def setUp(self): self.app = create_app("test") self.app.config["TESTING"] = True self.app.config["SERVER_NAME"] = "localhost" self.app_context = self.app.app_context() self.app_context.push() self.client = self.app.test_client() db.create_all() self.assessment_request1 = { "plan": "plans/plan_a", } self.assessment_request2 = { "plan": "plans/plan_b", } self.assessment_request3 = { "plan": "plans/plan_c", }
def setUp(self): self.app = create_app("test") self.app.config["TESTING"] = True self.app.config["SERVER_NAME"] = "localhost" self.app_context = self.app.app_context() self.app_context.push() self.client = self.app.test_client() db.create_all() self.assessment_indicator_result1 = { "result_id": uuid.uuid4(), "difference": "datas/data_a", "statistics": {"mean": 0.5}, } self.assessment_indicator_result2 = { "result_id": uuid.uuid4(), "difference": "datas/data_b", "statistics": {"mean": 0.6}, } self.assessment_indicator_result3 = { "result_id": uuid.uuid4(), "difference": "datas/data_c", "statistics": {"mean": 0.7}, }
import os from nc_assessment_request import create_app os.environ["NC_CONFIGURATION"] = \ os.environ.get("NC_CONFIGURATION") or "production" app = create_app(os.getenv("NC_CONFIGURATION"))