spiff-arena/tests/SpiffWorkflow/camunda/CamundaParserTest.py
Jon Herron 0892db6fa7 Squashed 'SpiffWorkflow/' content from commit 63db3e4
git-subtree-dir: SpiffWorkflow
git-subtree-split: 63db3e45947ec66b8d0efc2c74064004f8ff482c
2022-10-12 10:19:53 -04:00

24 lines
958 B
Python

from SpiffWorkflow.bpmn.parser.util import full_tag
from SpiffWorkflow.camunda.specs.UserTask import UserTask
from SpiffWorkflow.camunda.parser.CamundaParser import CamundaParser
from SpiffWorkflow.camunda.parser.UserTaskParser import UserTaskParser
from SpiffWorkflow.camunda.parser.business_rule_task import BusinessRuleTaskParser
from SpiffWorkflow.dmn.specs.BusinessRuleTask import BusinessRuleTask
from .BaseTestCase import BaseTestCase
class CamundaParserTest(BaseTestCase):
def setUp(self):
self.parser = CamundaParser()
def test_overrides(self):
overrides = [
('userTask', UserTaskParser, UserTask),
('businessRuleTask', BusinessRuleTaskParser, BusinessRuleTask),
]
for key, parser, spec in overrides:
self.assertIn(full_tag(key), self.parser.OVERRIDE_PARSER_CLASSES)
self.assertEqual((parser, spec), self.parser.OVERRIDE_PARSER_CLASSES.get(full_tag(key)))