From 1ed76bf53465ebff3bea28bcf7984c400b2f32cd Mon Sep 17 00:00:00 2001 From: mike cullerton Date: Thu, 2 Dec 2021 15:31:14 -0500 Subject: [PATCH] test for get_study_status --- .../get_study_status/get_study_status.bpmn | 47 +++++++++++++++++++ tests/scripts/test_get_study_status.py | 13 +++++ 2 files changed, 60 insertions(+) create mode 100644 tests/data/get_study_status/get_study_status.bpmn create mode 100644 tests/scripts/test_get_study_status.py diff --git a/tests/data/get_study_status/get_study_status.bpmn b/tests/data/get_study_status/get_study_status.bpmn new file mode 100644 index 00000000..760814db --- /dev/null +++ b/tests/data/get_study_status/get_study_status.bpmn @@ -0,0 +1,47 @@ + + + + + Flow_1iqprcz + + + + Flow_1iqprcz + Flow_0npc38l + study_status = get_study_status() + + + # Study Status +{{ study_status }} + Flow_0npc38l + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tests/scripts/test_get_study_status.py b/tests/scripts/test_get_study_status.py new file mode 100644 index 00000000..3d1ab58a --- /dev/null +++ b/tests/scripts/test_get_study_status.py @@ -0,0 +1,13 @@ +from tests.base_test import BaseTest + + +class TestGetStudyStatus(BaseTest): + + def test_get_study_status(self): + workflow = self.create_workflow('get_study_status') + workflow_api = self.get_workflow_api(workflow) + task = workflow_api.next_task + + self.assertEqual(task.data['study_status'], workflow.study.status.value) + + print('test_get_study_status')