[Erp5-report] r34362 luke - /erp5/trunk/products/ERP5/tests/testERP5Base.py
nobody at svn.erp5.org
nobody at svn.erp5.org
Thu Apr 8 11:06:41 CEST 2010
Author: luke
Date: Thu Apr 8 11:06:40 2010
New Revision: 34362
URL: http://svn.erp5.org?rev=34362&view=rev
Log:
- check that using doActionFor it is possible to store comments of edit workflow
Modified:
erp5/trunk/products/ERP5/tests/testERP5Base.py
Modified: erp5/trunk/products/ERP5/tests/testERP5Base.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/tests/testERP5Base.py?rev=34362&r1=34361&r2=34362&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/tests/testERP5Base.py [utf8] (original)
+++ erp5/trunk/products/ERP5/tests/testERP5Base.py [utf8] Thu Apr 8 11:06:40 2010
@@ -1447,14 +1447,24 @@
# workflow has no artificial comment
self.assertFalse(comment in [q['comment'] for q in workflow_history ])
+ def test_comment_edit_workflow_store_workflow(self):
+ comment = 'some comment'
+ person = self.portal.person_module.newContent(portal_type='Person')
+ self.portal.portal_workflow.doActionFor(person, 'edit_action', comment=comment)
+ workflow_history = self.getWorkflowHistory(person, 'edit_workflow')
+ # person is not changed
+ self.assertEqual(getattr(person, 'comment', None), None)
+ # workflow is affected
+ self.assertTrue(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
+ # person is not changed
self.assertEqual(getattr(person, 'comment', None), None)
- # workflow is impacted
+ # workflow is affected
self.assertTrue(comment in [q['comment'] for q in workflow_history])
def test_suite():
More information about the Erp5-report
mailing list