[Erp5-report] r21358 - /erp5/trunk/products/ERP5Type/tests/testERP5Type.py

nobody at svn.erp5.org nobody at svn.erp5.org
Thu Jun 5 15:48:29 CEST 2008


Author: vincent
Date: Thu Jun  5 15:48:22 2008
New Revision: 21358

URL: http://svn.erp5.org?rev=21358&view=rev
Log:
Keep the beta category visible by manager untill it's indexed. This is because, as indexation happens with portal_catalog's owner, and as it can be checked explicitely even in unrestricted environment (like it's done in CMFCategories), it has no meaning to reindex an invisible object. Thus the it's the test which must be fixed.

Modified:
    erp5/trunk/products/ERP5Type/tests/testERP5Type.py

Modified: erp5/trunk/products/ERP5Type/tests/testERP5Type.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5Type/tests/testERP5Type.py?rev=21358&r1=21357&r2=21358&view=diff
==============================================================================
--- erp5/trunk/products/ERP5Type/tests/testERP5Type.py (original)
+++ erp5/trunk/products/ERP5Type/tests/testERP5Type.py Thu Jun  5 15:48:22 2008
@@ -1807,12 +1807,6 @@
               title =       beta_title, )
       beta_path = beta.getCategoryRelativeUrl()
 
-      beta.manage_permission('View', roles=[], acquire=0)
-      beta.manage_permission('Access contents information', roles=[], acquire=0)
-      # with this security setting, it's not possible to access "beta":
-      self.assertRaises(Unauthorized,
-          region_category.restrictedTraverse, "beta")
-
       gamma_id = "gamma"
       gamma_title = "Gamma System"
       gamma = region_category.newContent(
@@ -1824,6 +1818,13 @@
       # Make sure categories are reindexed
       get_transaction().commit()
       self.tic()
+
+      beta.manage_permission('View', roles=[], acquire=0)
+      beta.manage_permission('Access contents information', roles=[], acquire=0)
+      # with this security setting, it's not possible to access "beta":
+      self.assertRaises(Unauthorized,
+          region_category.restrictedTraverse, "beta")
+
 
       # Create a new person, and associate it to beta and gamma.
       module = self.getPersonModule()




More information about the Erp5-report mailing list