Updated for `short_name` and `proposal_name`
Also cleaned up some for readability
This commit is contained in:
parent
f101176b13
commit
deb3d7bf67
|
@ -14,9 +14,12 @@ class TestUpdateStudyScript(BaseTest):
|
||||||
processor = WorkflowProcessor(workflow)
|
processor = WorkflowProcessor(workflow)
|
||||||
task = processor.next_task()
|
task = processor.next_task()
|
||||||
details = Box({
|
details = Box({
|
||||||
"label": "My New Title",
|
"title": "My New Title",
|
||||||
"short": "My New Short Title",
|
"short_title": "My New Short Title",
|
||||||
"value": "dhf8r"})
|
"pi": "dhf8r",
|
||||||
|
"short_name": "My Short Name",
|
||||||
|
"proposal_name": "My Proposal Name"
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
script = UpdateStudy()
|
script = UpdateStudy()
|
||||||
|
@ -26,9 +29,14 @@ class TestUpdateStudyScript(BaseTest):
|
||||||
# evaluated before they are passed to the script -
|
# evaluated before they are passed to the script -
|
||||||
# this allows us to do a lot more things like strings, functions, etc.
|
# this allows us to do a lot more things like strings, functions, etc.
|
||||||
# and it makes the arguments less confusing to use.
|
# and it makes the arguments less confusing to use.
|
||||||
script.do_task(task, workflow.study_id, workflow.id, title = details.label,
|
script.do_task(task, workflow.study_id, workflow.id,
|
||||||
short_title = details.short,
|
title=details.title,
|
||||||
pi = details.value)
|
short_title=details.short_title,
|
||||||
self.assertEqual("My New Title", workflow.study.title)
|
pi=details.pi,
|
||||||
self.assertEqual("My New Short Title", workflow.study.short_title)
|
short_name=details.short_name,
|
||||||
self.assertEqual("dhf8r", workflow.study.primary_investigator_id)
|
proposal_name=details.proposal_name)
|
||||||
|
self.assertEqual(details.title, workflow.study.title)
|
||||||
|
self.assertEqual(details.short_title, workflow.study.short_title)
|
||||||
|
self.assertEqual(details.pi, workflow.study.primary_investigator_id)
|
||||||
|
self.assertEqual(details.short_name, workflow.study.short_name)
|
||||||
|
self.assertEqual(details.proposal_name, workflow.study.proposal_name)
|
||||||
|
|
Loading…
Reference in New Issue