mirror of
https://github.com/sartography/spiff-arena.git
synced 2025-01-31 03:35:39 +00:00
20 lines
610 B
Python
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())
|