Adding a workflow from a spec

This commit is contained in:
Dan Funk 2019-12-18 14:42:40 -05:00
parent a734578327
commit fbbd6c6659
2 changed files with 7 additions and 5 deletions

View File

@ -115,10 +115,6 @@ paths:
tags:
- Studies
parameters:
- in: body
name: workflow_spec
schema:
$ref: '#/components/schemas/WorkflowSpec'
- name: study_id
in: path
required: true
@ -126,6 +122,11 @@ paths:
schema:
type: integer
format: int32
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/WorkflowSpec'
responses:
'200':
description: An array of workflows

View File

@ -48,7 +48,8 @@ class TestStudy(BaseTest, unittest.TestCase):
self.load_example_data()
study = db.session.query(StudyModel).first()
spec = db.session.query(WorkflowSpecModel).first()
rv = self.app.post('/v1.0/study/%i/workflows' % study.id, data=WorkflowSpecSchema().dump(spec))
rv = self.app.post('/v1.0/study/%i/workflows' % study.id,content_type="application/json",
data=json.dumps(WorkflowSpecSchema().dump(spec)))
self.assert_success(rv)