mirror of
https://github.com/sartography/cr-connect-workflow.git
synced 2025-02-22 12:48:25 +00:00
test for get_study_status
This commit is contained in:
parent
8c66a3d2ef
commit
1ed76bf534
47
tests/data/get_study_status/get_study_status.bpmn
Normal file
47
tests/data/get_study_status/get_study_status.bpmn
Normal file
@ -0,0 +1,47 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<bpmn:definitions xmlns:bpmn="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" id="Definitions_1mi5jsa" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="4.2.0">
|
||||
<bpmn:process id="Process_19squur" name="Study Status" isExecutable="true">
|
||||
<bpmn:startEvent id="StartEvent_1" name="Start">
|
||||
<bpmn:outgoing>Flow_1iqprcz</bpmn:outgoing>
|
||||
</bpmn:startEvent>
|
||||
<bpmn:sequenceFlow id="Flow_1iqprcz" sourceRef="StartEvent_1" targetRef="Activity_GetStudyStatus" />
|
||||
<bpmn:scriptTask id="Activity_GetStudyStatus" name="Get Study Status">
|
||||
<bpmn:incoming>Flow_1iqprcz</bpmn:incoming>
|
||||
<bpmn:outgoing>Flow_0npc38l</bpmn:outgoing>
|
||||
<bpmn:script>study_status = get_study_status()</bpmn:script>
|
||||
</bpmn:scriptTask>
|
||||
<bpmn:endEvent id="Event_005hgvx" name="Display Study Status">
|
||||
<bpmn:documentation># Study Status
|
||||
{{ study_status }}</bpmn:documentation>
|
||||
<bpmn:incoming>Flow_0npc38l</bpmn:incoming>
|
||||
</bpmn:endEvent>
|
||||
<bpmn:sequenceFlow id="Flow_0npc38l" sourceRef="Activity_GetStudyStatus" targetRef="Event_005hgvx" />
|
||||
</bpmn:process>
|
||||
<bpmndi:BPMNDiagram id="BPMNDiagram_1">
|
||||
<bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="Process_19squur">
|
||||
<bpmndi:BPMNEdge id="Flow_1iqprcz_di" bpmnElement="Flow_1iqprcz">
|
||||
<di:waypoint x="215" y="117" />
|
||||
<di:waypoint x="270" y="117" />
|
||||
</bpmndi:BPMNEdge>
|
||||
<bpmndi:BPMNEdge id="Flow_0npc38l_di" bpmnElement="Flow_0npc38l">
|
||||
<di:waypoint x="370" y="117" />
|
||||
<di:waypoint x="432" y="117" />
|
||||
</bpmndi:BPMNEdge>
|
||||
<bpmndi:BPMNShape id="_BPMNShape_StartEvent_2" bpmnElement="StartEvent_1">
|
||||
<dc:Bounds x="179" y="99" width="36" height="36" />
|
||||
<bpmndi:BPMNLabel>
|
||||
<dc:Bounds x="186" y="142" width="24" height="14" />
|
||||
</bpmndi:BPMNLabel>
|
||||
</bpmndi:BPMNShape>
|
||||
<bpmndi:BPMNShape id="Activity_07bvb7w_di" bpmnElement="Activity_GetStudyStatus">
|
||||
<dc:Bounds x="270" y="77" width="100" height="80" />
|
||||
</bpmndi:BPMNShape>
|
||||
<bpmndi:BPMNShape id="Event_005hgvx_di" bpmnElement="Event_005hgvx">
|
||||
<dc:Bounds x="432" y="99" width="36" height="36" />
|
||||
<bpmndi:BPMNLabel>
|
||||
<dc:Bounds x="417" y="142" width="68" height="27" />
|
||||
</bpmndi:BPMNLabel>
|
||||
</bpmndi:BPMNShape>
|
||||
</bpmndi:BPMNPlane>
|
||||
</bpmndi:BPMNDiagram>
|
||||
</bpmn:definitions>
|
13
tests/scripts/test_get_study_status.py
Normal file
13
tests/scripts/test_get_study_status.py
Normal file
@ -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')
|
Loading…
x
Reference in New Issue
Block a user