spiff-arena/tests/SpiffWorkflow/dmn/python_engine/InvalidBusinessRuleNameErrorTest.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

20 lines
610 B
Python

import unittest
from .PythonDecisionRunner import PythonDecisionRunner
class InvalidBusinessRuleNameErrorTest(unittest.TestCase):
def test_integer_decision_string_output_inclusive(self):
runner = PythonDecisionRunner('invalid_decision_name_error.dmn')
try:
res = runner.decide({'spam': 1})
except Exception as e:
self.assertRegexpMatches(str(e), "Did you mean 'spam'")
def suite():
return unittest.TestLoader().loadTestsFromTestCase(InvalidBusinessRuleNameErrorTest)
if __name__ == '__main__':
unittest.TextTestRunner(verbosity=2).run(suite())