34 lines
1.1 KiB
Python
34 lines
1.1 KiB
Python
# -*- coding: utf-8 -*-
|
|
|
|
|
|
|
|
import sys
|
|
import os
|
|
import unittest
|
|
sys.path.insert(0, os.path.join(os.path.dirname(__file__), '..', '..', '..'))
|
|
from SpiffWorkflow.bpmn.workflow import BpmnWorkflow
|
|
from tests.SpiffWorkflow.bpmn.BpmnWorkflowTestCase import BpmnWorkflowTestCase
|
|
from SpiffWorkflow.exceptions import WorkflowException
|
|
|
|
__author__ = 'essweine'
|
|
|
|
class ExclusiveGatewayNoDefaultTest(BpmnWorkflowTestCase):
|
|
"""The example bpmn diagram tests both a set cardinality from user input
|
|
as well as looping over an existing array."""
|
|
|
|
def setUp(self):
|
|
spec, subprocesses = self.load_workflow_spec('exclusive_gateway_no_default.bpmn', 'NoDefaultGateway')
|
|
self.workflow = BpmnWorkflow(spec, subprocesses)
|
|
|
|
def testRunThroughHappy(self):
|
|
|
|
first = self.workflow.get_tasks_from_spec_name('StartEvent_1')[0]
|
|
first.data = { 'x': 1 }
|
|
self.assertRaises(WorkflowException, self.workflow.do_engine_steps)
|
|
|
|
def suite():
|
|
return unittest.TestLoader().loadTestsFromTestCase(ExclusiveGatewayNoDefaultTest)
|
|
|
|
if __name__ == '__main__':
|
|
unittest.TextTestRunner(verbosity=2).run(suite())
|