[Erp5-report] r31642 romain - /erp5/trunk/products/ERP5OOo/tests/testIngestion.py

nobody at svn.erp5.org nobody at svn.erp5.org
Thu Jan 7 16:55:13 CET 2010


Author: romain
Date: Thu Jan  7 16:55:12 2010
New Revision: 31642

URL: http://svn.erp5.org?rev=31642&view=rev
Log:
Check that contribution tool is correctly indexed after business template installation.
Check that contribution tool is correctly indexed by ERP5Site_reindexAll.

Modified:
    erp5/trunk/products/ERP5OOo/tests/testIngestion.py

Modified: erp5/trunk/products/ERP5OOo/tests/testIngestion.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5OOo/tests/testIngestion.py?rev=31642&r1=31641&r2=31642&view=diff
==============================================================================
--- erp5/trunk/products/ERP5OOo/tests/testIngestion.py [utf8] (original)
+++ erp5/trunk/products/ERP5OOo/tests/testIngestion.py [utf8] Thu Jan  7 16:55:12 2010
@@ -42,6 +42,7 @@
 from Products.ERP5Type.tests.utils import FileUpload
 from Products.ERP5OOo.Document.OOoDocument import ConversionError
 from zLOG import LOG, INFO, ERROR
+from Products.CMFCore.utils import getToolByName
 
 # Define the conversion server host
 conversion_server_host = ('127.0.0.1', 8008)
@@ -1406,6 +1407,31 @@
                 ]
     self.playSequence(step_list, quiet)
 
+  def test_14_ContributionToolIndexation(self, quiet=QUIET, run=RUN_ALL_TEST):
+    """
+    Check that contribution tool is correctly indexed after business template
+    installation.
+    Check that contribution tool is correctly indexed by ERP5Site_reindexAll.
+    """
+    portal = self.portal
+
+    contribution_tool = getToolByName(portal, 'portal_contributions')
+    self.assertEquals(1,
+        len(portal.portal_catalog(path=contribution_tool.getPath())))
+
+    # Clear catalog
+    portal_catalog = self.getCatalogTool()
+    portal_catalog.manage_catalogClear()
+    # Commit                                                                                                                                           
+    transaction.commit()
+    # Reindex all
+    portal.ERP5Site_reindexAll()
+    transaction.commit()
+    self.tic()
+    transaction.commit()
+    self.assertEquals(1,
+        len(portal.portal_catalog(path=contribution_tool.getPath())))
+
 # Missing tests
 """
     property_dict = context.getPropertyDictFromUserLogin()




More information about the Erp5-report mailing list