mirror of
https://github.com/sartography/spiff-arena.git
synced 2025-01-31 03:35:39 +00:00
0892db6fa7
git-subtree-dir: SpiffWorkflow git-subtree-split: 63db3e45947ec66b8d0efc2c74064004f8ff482c
54 lines
1.4 KiB
Python
54 lines
1.4 KiB
Python
import unittest
|
|
|
|
from .PythonDecisionRunner import PythonDecisionRunner
|
|
|
|
|
|
class NearMissTestClass(unittest.TestCase):
|
|
"""
|
|
Doc: https://docs.camunda.org/manual/7.7/user-guide/dmn-engine/
|
|
"""
|
|
|
|
@classmethod
|
|
def setUpClass(cls):
|
|
cls.data = {
|
|
"Exclusive": [
|
|
{
|
|
"ExclusiveSpaceRoomID": "121",
|
|
}
|
|
],
|
|
"eXclusive": [
|
|
{
|
|
"ExclusiveSpaceRoomID": "121",
|
|
}
|
|
],
|
|
"EXCLUSIVE": [
|
|
{
|
|
"ExclusiveSpaceRoomID": "121",
|
|
}
|
|
],
|
|
"personnel": [
|
|
{
|
|
"PersonnelType": "Faculty",
|
|
"label": "Steven K Funkhouser (sf4d)",
|
|
"value": "sf4d"
|
|
}
|
|
],
|
|
|
|
"shared": []
|
|
}
|
|
|
|
cls.runner = PythonDecisionRunner('exclusive.dmn')
|
|
|
|
def test_string_decision_string_output1(self):
|
|
self.assertRaisesRegex(Exception,
|
|
".+\['Exclusive', 'eXclusive', 'EXCLUSIVE'\].+",
|
|
self.runner.decide,
|
|
self.data)
|
|
|
|
|
|
def suite():
|
|
return unittest.TestLoader().loadTestsFromTestCase(NearMissTestClass)
|
|
|
|
if __name__ == '__main__':
|
|
unittest.TextTestRunner(verbosity=2).run(suite())
|