[Erp5-report] r34359 luke - /erp5/trunk/products/ERP5/tests/testERP5Base.py

nobody at svn.erp5.org nobody at svn.erp5.org
Thu Apr 8 10:57:25 CEST 2010


Author: luke
Date: Thu Apr  8 10:57:24 2010
New Revision: 34359

URL: http://svn.erp5.org?rev=34359&view=rev
Log:
 - check that during using edit to store comment parameter edit workflow history is not garbaged with this parameter

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=34359&r1=34358&r2=34359&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/tests/testERP5Base.py [utf8] (original)
+++ erp5/trunk/products/ERP5/tests/testERP5Base.py [utf8] Thu Apr  8 10:57:24 2010
@@ -1433,6 +1433,20 @@
                                      translated_portal_type='Personne')])
     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():
   suite = unittest.TestSuite()
   suite.addTest(unittest.makeSuite(TestERP5Base))




More information about the Erp5-report mailing list