Fixing some tests

This commit is contained in:
alicia pritchett 2021-10-06 15:24:58 -04:00
parent 7b6beae9c1
commit ea4e382f06
3 changed files with 4 additions and 4 deletions

View File

@ -71,7 +71,7 @@ class TestStudyApi(BaseTest):
self.assertEqual(False, category['admin'])
self.assertEqual(1, len(category["workflows"]))
workflow = category["workflows"][0]
self.assertEqual("random_fact", workflow["id"])
self.assertEqual("Random Fact", workflow["display_name"])
self.assertEqual("optional", workflow["state"])
self.assertEqual("not_started", workflow["status"])
self.assertEqual(0, workflow["total_tasks"])

View File

@ -80,7 +80,7 @@ class TestStudyService(BaseTest):
self.assertEqual(0, workflow.completed_tasks)
# Initialize the Workflow with the workflow processor.
workflow_model = db.session.query(WorkflowModel).filter(WorkflowModel.workflow_spec_id == workflow.id).first()
workflow_model = db.session.query(WorkflowModel).filter(WorkflowModel.id == workflow.id).first()
processor = WorkflowProcessor(workflow_model)
processor.do_engine_steps()

View File

@ -94,7 +94,7 @@ class TestTasksApi(BaseTest):
json_data = json.loads(rv.get_data(as_text=True))
tasks = TaskEventSchema(many=True).load(json_data)
self.assertEqual(1, len(tasks))
self.assertEqual(workflow.workflow_spec_id, tasks[0]['workflow']['id'])
self.assertEqual(workflow.id, tasks[0]['workflow']['id'])
self.assertEqual(workflow.study.id, tasks[0]['study']['id'])
self.assertEqual("Test Workflows", tasks[0]['workflow']['category_display_name'])