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

nobody at svn.erp5.org nobody at svn.erp5.org
Thu Apr 8 11:04:04 CEST 2010


Author: luke
Date: Thu Apr  8 11:04:02 2010
New Revision: 34361

URL: http://svn.erp5.org?rev=34361&view=rev
Log:
 - check that during invoking non edit_workflow transition comment is stored in workflow history, not in object

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=34361&r1=34360&r2=34361&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/tests/testERP5Base.py [utf8] (original)
+++ erp5/trunk/products/ERP5/tests/testERP5Base.py [utf8] Thu Apr  8 11:04:02 2010
@@ -1441,11 +1441,21 @@
     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()




More information about the Erp5-report mailing list