Commit 86212ca5 authored by Łukasz Nowak's avatar Łukasz Nowak

- check that during invoking non edit_workflow transition comment is stored...

 - check that during invoking non edit_workflow transition comment is stored in workflow history, not in object


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@34361 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent e4b0e224
......@@ -1441,11 +1441,21 @@ class TestERP5Base(ERP5TypeTestCase):
comment = 'some comment'
person = self.portal.person_module.newContent(portal_type='Person')
person.edit(comment = comment)
edit_workflow = self.getWorkflowHistory(person, 'edit_workflow')
workflow_history = self.getWorkflowHistory(person, 'edit_workflow')
# person has property comment with value
self.assertEqual(person.comment, comment)
# workflow has no artificial comment
self.assertFalse(comment in [q['comment'] for q in edit_workflow ])
self.assertFalse(comment in [q['comment'] for q in workflow_history ])
def test_comment_validation_workflow(self):
comment = 'some comment'
person = self.portal.person_module.newContent(portal_type='Person')
person.validate(comment = comment)
workflow_history = self.getWorkflowHistory(person, 'validation_workflow')
# person os not changed
self.assertEqual(getattr(person, 'comment', None), None)
# workflow is impacted
self.assertTrue(comment in [q['comment'] for q in workflow_history])
def test_suite():
suite = unittest.TestSuite()
......
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