mirror of
https://github.com/status-im/spiff-arena.git
synced 2025-01-10 02:05:40 +00:00
c237e218b2
0e61be85 Merge pull request #289 from sartography/improvement/execution-and-serialization-cleanup 527684da fix some typos in the class & method docs 0dff44a4 Merge branch 'main' into improvement/execution-and-serialization-cleanup 64737498 Allow for other PythonScriptEngine environments besides task data (#288) dd63e916 remove some unused tests & diagrams 24aae519 clean up various small stuff 3b2dc35d use context when opening files for parsing 69eec3eb update class/method docs 24528dfb move all spec conversion classes to top level 5af33b11 remove some unused methods related to old serializer 931b90fb reorganize serializer 4e81ed29 consolidate pointless serializer classes d62acf02 change task_spec._update_hook to return a boolean indicating whether the task is ready git-subtree-dir: SpiffWorkflow git-subtree-split: 0e61be85c47474a33037e6f398e64c96e02f13ad
27 lines
789 B
Python
27 lines
789 B
Python
import unittest
|
|
|
|
from SpiffWorkflow.bpmn.PythonScriptEngineEnvironment import Box
|
|
|
|
|
|
class BoxDeepCopyTest(unittest.TestCase):
|
|
|
|
def test_deep_copy_of_box(self):
|
|
data = {"foods": {
|
|
"spam": {"delicious": False}
|
|
},
|
|
"hamsters": ['your', 'mother']
|
|
}
|
|
data = Box(data)
|
|
data2 = data.__deepcopy__()
|
|
self.assertEqual(data, data2)
|
|
data.foods.spam.delicious = True
|
|
data.hamsters = ['your', 'father']
|
|
self.assertFalse(data2.foods.spam.delicious)
|
|
self.assertEqual(['your', 'mother'], data2.hamsters)
|
|
|
|
def suite():
|
|
return unittest.TestLoader().loadTestsFromTestCase(BoxDeepCopyTest)
|
|
|
|
if __name__ == '__main__':
|
|
unittest.TextTestRunner(verbosity=2).run(suite())
|