mirror of
https://github.com/status-im/spiff-arena.git
synced 2025-01-09 17:55:48 +00:00
0892db6fa7
git-subtree-dir: SpiffWorkflow git-subtree-split: 63db3e45947ec66b8d0efc2c74064004f8ff482c
38 lines
1.2 KiB
Python
38 lines
1.2 KiB
Python
# -*- coding: utf-8 -*-
|
|
|
|
import unittest
|
|
|
|
from SpiffWorkflow.bpmn.PythonScriptEngine import PythonScriptEngine
|
|
from SpiffWorkflow.bpmn.workflow import BpmnWorkflow
|
|
from tests.SpiffWorkflow.bpmn.BpmnWorkflowTestCase import BpmnWorkflowTestCase
|
|
|
|
__author__ = 'sartography'
|
|
|
|
|
|
class SameNameBugTest(BpmnWorkflowTestCase):
|
|
|
|
"""Should we bail out with a good error message, when two BPMN diagrams
|
|
that work with each other, have tasks with the same id?!?"""
|
|
|
|
def setUp(self):
|
|
spec, subprocesses = self.load_workflow_spec('same_id*.bpmn', 'same_id')
|
|
self.workflow = BpmnWorkflow(spec, subprocesses, script_engine=PythonScriptEngine())
|
|
|
|
def testRunThroughHappy(self):
|
|
self.actual_test(save_restore=False)
|
|
|
|
def testThroughSaveRestore(self):
|
|
self.actual_test(save_restore=True)
|
|
|
|
def actual_test(self,save_restore = False):
|
|
if save_restore:
|
|
self.save_restore()
|
|
self.workflow.do_engine_steps()
|
|
if save_restore:
|
|
self.save_restore()
|
|
|
|
def suite():
|
|
return unittest.TestLoader().loadTestsFromTestCase(SameNameBugTest)
|
|
if __name__ == '__main__':
|
|
unittest.TextTestRunner(verbosity=2).run(suite())
|