Commit 7d81afef authored by Łukasz Nowak's avatar Łukasz Nowak

- check that during using edit to store comment parameter edit workflow...

 - check that during using edit to store comment parameter edit workflow history is not garbaged with this parameter


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@34359 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 738e7a5f
...@@ -1433,6 +1433,20 @@ class TestERP5Base(ERP5TypeTestCase): ...@@ -1433,6 +1433,20 @@ class TestERP5Base(ERP5TypeTestCase):
translated_portal_type='Personne')]) translated_portal_type='Personne')])
transaction.abort() transaction.abort()
def getWorkflowHistory(self, document, workflow_id):
return self.portal.portal_workflow.getInfoFor(ob=document, name='history',
wf_id=workflow_id)
def test_comment_edit_workflow(self):
comment = 'some comment'
person = self.portal.person_module.newContent(portal_type='Person')
person.edit(comment = comment)
edit_workflow = 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 ])
def test_suite(): def test_suite():
suite = unittest.TestSuite() suite = unittest.TestSuite()
suite.addTest(unittest.makeSuite(TestERP5Base)) suite.addTest(unittest.makeSuite(TestERP5Base))
......
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