mirror of
https://github.com/status-im/spiff-arena.git
synced 2025-01-24 16:59:46 +00:00
0892db6fa7
git-subtree-dir: SpiffWorkflow git-subtree-split: 63db3e45947ec66b8d0efc2c74064004f8ff482c
31 lines
978 B
Python
31 lines
978 B
Python
# -*- coding: utf-8 -*-
|
|
|
|
import sys
|
|
import os
|
|
import unittest
|
|
|
|
sys.path.insert(0, os.path.join(os.path.dirname(__file__), '..', '..', '..'))
|
|
from SpiffWorkflow.bpmn.parser.ValidationException import ValidationException
|
|
from tests.SpiffWorkflow.bpmn.BpmnWorkflowTestCase import BpmnWorkflowTestCase
|
|
|
|
__author__ = 'essweine'
|
|
|
|
|
|
class InvalidProcessIDTest(BpmnWorkflowTestCase):
|
|
|
|
def testInvalidWorkflowProcess(self):
|
|
self.assertRaisesRegex(
|
|
Exception, "The process '\w+' was not found*",
|
|
self.load_workflow_spec, "invalid_process*.bpmn", "topworkflow")
|
|
|
|
def testInvalidCalledElement(self):
|
|
self.assertRaisesRegex(
|
|
ValidationException, "The process '\w+' was not found",
|
|
self.load_workflow_spec, "invalid_process*.bpmn", "top_workflow")
|
|
|
|
def suite():
|
|
return unittest.TestLoader().loadTestsFromTestCase(InvalidProcessIDTest)
|
|
|
|
if __name__ == '__main__':
|
|
unittest.TextTestRunner(verbosity=2).run(suite())
|