Merge branch 'varchar-category-id-483' of github.com:sartography/cr-connect-workflow into varchar-category-id-483
This commit is contained in:
commit
c36a76a8bc
|
@ -127,7 +127,7 @@ class WorkflowMetadata(object):
|
|||
def from_workflow(cls, workflow: WorkflowModel):
|
||||
is_review = FileService.is_workflow_review(workflow.workflow_spec_id)
|
||||
instance = cls(
|
||||
id=workflow.workflow_spec_id,
|
||||
id=workflow.id,
|
||||
display_name=workflow.workflow_spec.display_name,
|
||||
description=workflow.workflow_spec.description,
|
||||
spec_version=workflow.spec_version(),
|
||||
|
|
|
@ -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"])
|
||||
|
|
|
@ -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()
|
||||
|
||||
|
|
|
@ -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'])
|
||||
|
||||
|
|
Loading…
Reference in New Issue