[Erp5-report] r35770 nicolas.dumazet - /erp5/trunk/products/ERP5/tests/testTemplate.py

nobody at svn.erp5.org nobody at svn.erp5.org
Mon May 31 11:12:05 CEST 2010


Author: nicolas.dumazet
Date: Mon May 31 11:11:59 2010
New Revision: 35770

URL: http://svn.erp5.org?rev=35770&view=rev
Log:
Marking test_manyTemplatesWithoutReindexation as expectedFailure, with a lengthy explanation

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

Modified: erp5/trunk/products/ERP5/tests/testTemplate.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/tests/testTemplate.py?rev=35770&r1=35769&r2=35770&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/tests/testTemplate.py [utf8] (original)
+++ erp5/trunk/products/ERP5/tests/testTemplate.py [utf8] Mon May 31 11:11:59 2010
@@ -33,6 +33,7 @@
 import transaction
 from AccessControl.SecurityManagement import newSecurityManager
 from Products.ERP5Type.tests.ERP5TypeTestCase import ERP5TypeTestCase
+from Products.ERP5Type.tests.backportUnittest import expectedFailure
 from Products.ERP5Type import Permissions
 from Products.ERP5Form.Document.Preference import Priority
 
@@ -320,6 +321,17 @@
 
     self.assertEqual(len(preference.objectIds()), 1)
 
+  # Reason for test failure: 
+  #
+  # Base_makeTemplateFromDocument uses portal_preference.getActivePreference(),
+  # and if the user has no preference, it creates a new preference to attach it
+  # the template.
+  # But getActivePreference uses the catalog, for performance reasons. Which
+  # means that two successive calls to Base_makeTemplateFromDocument, from an
+  # initial state where the user has no active preferences, will create wrongly
+  # two preferences instead of one: during the second call, a preference does
+  # exist, and is enabled for current user, but is just not yet reindexed.
+  @expectedFailure
   def test_manyTemplatesWithoutReindexation(self):
     """Check what happen when templates are created one by one without reindexation"""
     self.createUserAndLogin(self.id())




More information about the Erp5-report mailing list