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):
|
def from_workflow(cls, workflow: WorkflowModel):
|
||||||
is_review = FileService.is_workflow_review(workflow.workflow_spec_id)
|
is_review = FileService.is_workflow_review(workflow.workflow_spec_id)
|
||||||
instance = cls(
|
instance = cls(
|
||||||
id=workflow.workflow_spec_id,
|
id=workflow.id,
|
||||||
display_name=workflow.workflow_spec.display_name,
|
display_name=workflow.workflow_spec.display_name,
|
||||||
description=workflow.workflow_spec.description,
|
description=workflow.workflow_spec.description,
|
||||||
spec_version=workflow.spec_version(),
|
spec_version=workflow.spec_version(),
|
||||||
|
|
|
@ -71,7 +71,7 @@ class TestStudyApi(BaseTest):
|
||||||
self.assertEqual(False, category['admin'])
|
self.assertEqual(False, category['admin'])
|
||||||
self.assertEqual(1, len(category["workflows"]))
|
self.assertEqual(1, len(category["workflows"]))
|
||||||
workflow = category["workflows"][0]
|
workflow = category["workflows"][0]
|
||||||
self.assertEqual("random_fact", workflow["id"])
|
self.assertEqual("Random Fact", workflow["display_name"])
|
||||||
self.assertEqual("optional", workflow["state"])
|
self.assertEqual("optional", workflow["state"])
|
||||||
self.assertEqual("not_started", workflow["status"])
|
self.assertEqual("not_started", workflow["status"])
|
||||||
self.assertEqual(0, workflow["total_tasks"])
|
self.assertEqual(0, workflow["total_tasks"])
|
||||||
|
|
|
@ -80,7 +80,7 @@ class TestStudyService(BaseTest):
|
||||||
self.assertEqual(0, workflow.completed_tasks)
|
self.assertEqual(0, workflow.completed_tasks)
|
||||||
|
|
||||||
# Initialize the Workflow with the workflow processor.
|
# 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 = WorkflowProcessor(workflow_model)
|
||||||
processor.do_engine_steps()
|
processor.do_engine_steps()
|
||||||
|
|
||||||
|
@ -265,4 +265,4 @@ class TestStudyService(BaseTest):
|
||||||
self.assertEquals(1, len(associates))
|
self.assertEquals(1, len(associates))
|
||||||
assoc_json = StudyAssociatedSchema(many=True).dump(associates)
|
assoc_json = StudyAssociatedSchema(many=True).dump(associates)
|
||||||
print(assoc_json)
|
print(assoc_json)
|
||||||
self.assertEquals("Dan", assoc_json[0]['ldap_info']['given_name'])
|
self.assertEquals("Dan", assoc_json[0]['ldap_info']['given_name'])
|
||||||
|
|
|
@ -94,7 +94,7 @@ class TestTasksApi(BaseTest):
|
||||||
json_data = json.loads(rv.get_data(as_text=True))
|
json_data = json.loads(rv.get_data(as_text=True))
|
||||||
tasks = TaskEventSchema(many=True).load(json_data)
|
tasks = TaskEventSchema(many=True).load(json_data)
|
||||||
self.assertEqual(1, len(tasks))
|
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(workflow.study.id, tasks[0]['study']['id'])
|
||||||
self.assertEqual("Test Workflows", tasks[0]['workflow']['category_display_name'])
|
self.assertEqual("Test Workflows", tasks[0]['workflow']['category_display_name'])
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue