Adding a workflow from a spec
This commit is contained in:
parent
a734578327
commit
fbbd6c6659
|
@ -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
|
||||
|
|
|
@ -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)
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue