Make sure we are testing both versions of the setting functions as well as the getting functions
This commit is contained in:
parent
f592a8a0b0
commit
55f8825b3c
|
@ -11,22 +11,35 @@
|
||||||
<bpmn:script>sponsors = study_info('sponsors')</bpmn:script>
|
<bpmn:script>sponsors = study_info('sponsors')</bpmn:script>
|
||||||
</bpmn:scriptTask>
|
</bpmn:scriptTask>
|
||||||
<bpmn:sequenceFlow id="SequenceFlow_1bqiin0" sourceRef="Task_Script_Load_Study_Sponsors" targetRef="Activity_0cm6tn2" />
|
<bpmn:sequenceFlow id="SequenceFlow_1bqiin0" sourceRef="Task_Script_Load_Study_Sponsors" targetRef="Activity_0cm6tn2" />
|
||||||
<bpmn:sequenceFlow id="Flow_09cika8" sourceRef="Activity_0cm6tn2" targetRef="Activity_0d8iftx" />
|
<bpmn:sequenceFlow id="Flow_09cika8" sourceRef="Activity_0cm6tn2" targetRef="Activity_14td33q" />
|
||||||
<bpmn:scriptTask id="Activity_0cm6tn2" name="setval">
|
<bpmn:scriptTask id="Activity_0cm6tn2" name="setval">
|
||||||
<bpmn:incoming>SequenceFlow_1bqiin0</bpmn:incoming>
|
<bpmn:incoming>SequenceFlow_1bqiin0</bpmn:incoming>
|
||||||
<bpmn:outgoing>Flow_09cika8</bpmn:outgoing>
|
<bpmn:outgoing>Flow_09cika8</bpmn:outgoing>
|
||||||
<bpmn:script>update_study_associate(uid='lb3dp',role='SuperDude',send_email=False,access=True)</bpmn:script>
|
<bpmn:script>update_study_associate(uid='lb3dp',role='SuperDude',send_email=False,access=True)</bpmn:script>
|
||||||
</bpmn:scriptTask>
|
</bpmn:scriptTask>
|
||||||
<bpmn:scriptTask id="Activity_0d8iftx" name="getval">
|
<bpmn:scriptTask id="Activity_0d8iftx" name="getval2">
|
||||||
<bpmn:incoming>Flow_09cika8</bpmn:incoming>
|
<bpmn:incoming>Flow_1vlh6s0</bpmn:incoming>
|
||||||
<bpmn:outgoing>Flow_0cttkwp</bpmn:outgoing>
|
<bpmn:outgoing>Flow_0cttkwp</bpmn:outgoing>
|
||||||
<bpmn:script>out = get_study_associates()
|
<bpmn:script>out3 = get_study_associates()
|
||||||
out2 = get_study_associate('lb3dp')</bpmn:script>
|
out4 = get_study_associate('lb3dp')</bpmn:script>
|
||||||
</bpmn:scriptTask>
|
</bpmn:scriptTask>
|
||||||
<bpmn:endEvent id="Event_0c8gcuh">
|
<bpmn:endEvent id="Event_0c8gcuh">
|
||||||
<bpmn:incoming>Flow_0cttkwp</bpmn:incoming>
|
<bpmn:incoming>Flow_0cttkwp</bpmn:incoming>
|
||||||
</bpmn:endEvent>
|
</bpmn:endEvent>
|
||||||
<bpmn:sequenceFlow id="Flow_0cttkwp" sourceRef="Activity_0d8iftx" targetRef="Event_0c8gcuh" />
|
<bpmn:sequenceFlow id="Flow_0cttkwp" sourceRef="Activity_0d8iftx" targetRef="Event_0c8gcuh" />
|
||||||
|
<bpmn:scriptTask id="Activity_0run091" name="setval - 2">
|
||||||
|
<bpmn:incoming>Flow_14n3ixy</bpmn:incoming>
|
||||||
|
<bpmn:outgoing>Flow_1vlh6s0</bpmn:outgoing>
|
||||||
|
<bpmn:script>update_study_associates([{'uid':'lb3dp','role':'SuperGal','send_email':False,'access':True}])</bpmn:script>
|
||||||
|
</bpmn:scriptTask>
|
||||||
|
<bpmn:sequenceFlow id="Flow_1vlh6s0" sourceRef="Activity_0run091" targetRef="Activity_0d8iftx" />
|
||||||
|
<bpmn:scriptTask id="Activity_14td33q" name="getval">
|
||||||
|
<bpmn:incoming>Flow_09cika8</bpmn:incoming>
|
||||||
|
<bpmn:outgoing>Flow_14n3ixy</bpmn:outgoing>
|
||||||
|
<bpmn:script>out = get_study_associates()
|
||||||
|
out2 = get_study_associate('lb3dp')</bpmn:script>
|
||||||
|
</bpmn:scriptTask>
|
||||||
|
<bpmn:sequenceFlow id="Flow_14n3ixy" sourceRef="Activity_14td33q" targetRef="Activity_0run091" />
|
||||||
</bpmn:process>
|
</bpmn:process>
|
||||||
<bpmndi:BPMNDiagram id="BPMNDiagram_1">
|
<bpmndi:BPMNDiagram id="BPMNDiagram_1">
|
||||||
<bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="Process_0exnnpv">
|
<bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="Process_0exnnpv">
|
||||||
|
@ -46,20 +59,34 @@ out2 = get_study_associate('lb3dp')</bpmn:script>
|
||||||
</bpmndi:BPMNShape>
|
</bpmndi:BPMNShape>
|
||||||
<bpmndi:BPMNEdge id="Flow_09cika8_di" bpmnElement="Flow_09cika8">
|
<bpmndi:BPMNEdge id="Flow_09cika8_di" bpmnElement="Flow_09cika8">
|
||||||
<di:waypoint x="540" y="117" />
|
<di:waypoint x="540" y="117" />
|
||||||
<di:waypoint x="600" y="117" />
|
<di:waypoint x="580" y="117" />
|
||||||
</bpmndi:BPMNEdge>
|
</bpmndi:BPMNEdge>
|
||||||
<bpmndi:BPMNShape id="Activity_0wnwluq_di" bpmnElement="Activity_0cm6tn2">
|
<bpmndi:BPMNShape id="Activity_0wnwluq_di" bpmnElement="Activity_0cm6tn2">
|
||||||
<dc:Bounds x="440" y="77" width="100" height="80" />
|
<dc:Bounds x="440" y="77" width="100" height="80" />
|
||||||
</bpmndi:BPMNShape>
|
</bpmndi:BPMNShape>
|
||||||
<bpmndi:BPMNShape id="Activity_0cq37mm_di" bpmnElement="Activity_0d8iftx">
|
<bpmndi:BPMNShape id="Activity_0cq37mm_di" bpmnElement="Activity_0d8iftx">
|
||||||
<dc:Bounds x="600" y="77" width="100" height="80" />
|
<dc:Bounds x="900" y="77" width="100" height="80" />
|
||||||
</bpmndi:BPMNShape>
|
</bpmndi:BPMNShape>
|
||||||
<bpmndi:BPMNShape id="Event_0c8gcuh_di" bpmnElement="Event_0c8gcuh">
|
<bpmndi:BPMNShape id="Event_0c8gcuh_di" bpmnElement="Event_0c8gcuh">
|
||||||
<dc:Bounds x="762" y="99" width="36" height="36" />
|
<dc:Bounds x="1042" y="99" width="36" height="36" />
|
||||||
</bpmndi:BPMNShape>
|
</bpmndi:BPMNShape>
|
||||||
<bpmndi:BPMNEdge id="Flow_0cttkwp_di" bpmnElement="Flow_0cttkwp">
|
<bpmndi:BPMNEdge id="Flow_0cttkwp_di" bpmnElement="Flow_0cttkwp">
|
||||||
<di:waypoint x="700" y="117" />
|
<di:waypoint x="1000" y="117" />
|
||||||
<di:waypoint x="762" y="117" />
|
<di:waypoint x="1042" y="117" />
|
||||||
|
</bpmndi:BPMNEdge>
|
||||||
|
<bpmndi:BPMNShape id="Activity_0run091_di" bpmnElement="Activity_0run091">
|
||||||
|
<dc:Bounds x="750" y="77" width="100" height="80" />
|
||||||
|
</bpmndi:BPMNShape>
|
||||||
|
<bpmndi:BPMNEdge id="Flow_1vlh6s0_di" bpmnElement="Flow_1vlh6s0">
|
||||||
|
<di:waypoint x="850" y="117" />
|
||||||
|
<di:waypoint x="900" y="117" />
|
||||||
|
</bpmndi:BPMNEdge>
|
||||||
|
<bpmndi:BPMNShape id="Activity_14td33q_di" bpmnElement="Activity_14td33q">
|
||||||
|
<dc:Bounds x="580" y="77" width="100" height="80" />
|
||||||
|
</bpmndi:BPMNShape>
|
||||||
|
<bpmndi:BPMNEdge id="Flow_14n3ixy_di" bpmnElement="Flow_14n3ixy">
|
||||||
|
<di:waypoint x="680" y="117" />
|
||||||
|
<di:waypoint x="750" y="117" />
|
||||||
</bpmndi:BPMNEdge>
|
</bpmndi:BPMNEdge>
|
||||||
</bpmndi:BPMNPlane>
|
</bpmndi:BPMNPlane>
|
||||||
</bpmndi:BPMNDiagram>
|
</bpmndi:BPMNDiagram>
|
||||||
|
|
|
@ -52,6 +52,13 @@ class TestSudySponsorsScript(BaseTest):
|
||||||
self.assertEquals({'uid': 'lb3dp', 'role': 'SuperDude', 'send_email': False, 'access': True}
|
self.assertEquals({'uid': 'lb3dp', 'role': 'SuperDude', 'send_email': False, 'access': True}
|
||||||
, data['out2'])
|
, data['out2'])
|
||||||
|
|
||||||
|
self.assertEquals([{'uid': 'dhf8r', 'role': 'owner', 'send_email': True, 'access': True},
|
||||||
|
{'uid': 'lb3dp', 'role': 'SuperGal', 'send_email': False, 'access': True}]
|
||||||
|
, data['out3'])
|
||||||
|
self.assertEquals({'uid': 'lb3dp', 'role': 'SuperGal', 'send_email': False, 'access': True}
|
||||||
|
, data['out4'])
|
||||||
|
|
||||||
|
|
||||||
self.assertEquals(3, len(data['sponsors']))
|
self.assertEquals(3, len(data['sponsors']))
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue