[Erp5-report] r12033 - /erp5/trunk/products/ERP5/tests/testBase.py

nobody at svn.erp5.org nobody at svn.erp5.org
Thu Jan 11 19:21:49 CET 2007


Author: jerome
Date: Thu Jan 11 19:21:45 2007
New Revision: 12033

URL: http://svn.erp5.org?rev=12033&view=rev
Log:
call getattr later, otherwise we get the AttributeError before calling
assertRaises


Modified:
    erp5/trunk/products/ERP5/tests/testBase.py

Modified: erp5/trunk/products/ERP5/tests/testBase.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/tests/testBase.py?rev=12033&r1=12032&r2=12033&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/tests/testBase.py (original)
+++ erp5/trunk/products/ERP5/tests/testBase.py Thu Jan 11 19:21:45 2007
@@ -946,7 +946,7 @@
     # Add a non-existent workflow.
     pw = self.getWorkflowTool()
     dummy_worlflow_id = 'never_existent_workflow'
-    pw.manage_addWorkflow('dc_workflow (Web-configurable workflow)', 
+    pw.manage_addWorkflow('dc_workflow (Web-configurable workflow)',
                           dummy_worlflow_id)
     cbt = pw._chains_by_type
     props = {}
@@ -961,7 +961,8 @@
     _aq_reset()
 
     try:
-      self.assertRaises(AttributeError, obj.thisMethodShouldNotBePresent)
+      self.assertRaises(AttributeError, getattr, obj,
+                        'thisMethodShouldNotBePresent')
     finally:
       # Make sure that the artificial workflow is not referred to any longer.
       cbt = pw._chains_by_type




More information about the Erp5-report mailing list