[Erp5-report] r16291 - /erp5/trunk/products/ERP5/tests/testAccounting.py
nobody at svn.erp5.org
nobody at svn.erp5.org
Wed Sep 12 12:50:41 CEST 2007
Author: jerome
Date: Wed Sep 12 12:50:37 2007
New Revision: 16291
URL: http://svn.erp5.org?rev=16291&view=rev
Log:
Make sure _aq_dynamic is called before calling the workflow method, otherwise .enable might not been wrapped yet. This happen in --load
Modified:
erp5/trunk/products/ERP5/tests/testAccounting.py
Modified: erp5/trunk/products/ERP5/tests/testAccounting.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/tests/testAccounting.py?rev=16291&r1=16290&r2=16291&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/tests/testAccounting.py (original)
+++ erp5/trunk/products/ERP5/tests/testAccounting.py Wed Sep 12 12:50:37 2007
@@ -171,9 +171,12 @@
doc.validate()
# and the preference enabled
- self.portal.portal_preferences.accounting_zuite_preference\
- .manage_addLocalRoles(self.username, ('Auditor', ))
- self.portal.portal_preferences.accounting_zuite_preference.enable()
+ preference = self.portal.portal_preferences.accounting_zuite_preference
+ pref.manage_addLocalRoles(self.username, ('Auditor', ))
+ # Make sure _aq_dynamic is called before calling the workflow method
+ # otherwise .enable might not been wrapped yet. This happen in --load
+ pref._aq_dynamic('hack')
+ pref.enable()
# and all this available to catalog
get_transaction().commit()
More information about the Erp5-report
mailing list