Commit 88e2af63 authored by wenjie.zheng's avatar wenjie.zheng

erp5_workflow_test_data: new test test_09_testBaseGetWorkflowHistoryItemListScript added.

parent 19129849
...@@ -110,6 +110,24 @@ class TestERP5WorkflowMixin(ERP5TypeTestCase): ...@@ -110,6 +110,24 @@ class TestERP5WorkflowMixin(ERP5TypeTestCase):
checkExpectedDict({"category": "workflow", "name": "Invalidate"}, checkExpectedDict({"category": "workflow", "name": "Invalidate"},
action) action)
def test_09_testBaseGetWorkflowHistoryItemListScript(self):
"""
Base_getWorkflowHistoryItemList is used for user interface, make sure it is still
working fine
"""
new_object = self.getTestObject()
self.doActionFor(new_object, "validate")
item_list = new_object.Base_getWorkflowHistoryItemList("testing_workflow", display=0)
self.assertEqual(3, len(item_list))
def checkLine(expected_data, index):
line = item_list[index]
for key in expected_data.keys():
self.assertEqual(expected_data[key], line.getProperty(key))
checkLine({'state': 'draft'}, 0)
checkLine({'state': 'draft'}, 1)
checkLine({'state': 'validated'}, 2)
### Doesn't exist yet ### Doesn't exist yet
def _testSimpleWorklist(self): def _testSimpleWorklist(self):
pass pass
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment