From 530379f11376a62a97c32b956f8225cea05731ab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9rome=20Perrin?= <jerome@nexedi.com> Date: Mon, 3 Sep 2007 07:36:06 +0000 Subject: [PATCH] don't use immediate reindex git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@16008 20353a03-c40f-0410-a6d1-a30d3c3de9de --- product/ERP5/tests/testERP5HR.py | 3 --- product/ERP5Type/tests/testXMLMatrix.py | 12 +++++++++--- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/product/ERP5/tests/testERP5HR.py b/product/ERP5/tests/testERP5HR.py index 0d02f66e66..b5ec4f5d8f 100644 --- a/product/ERP5/tests/testERP5HR.py +++ b/product/ERP5/tests/testERP5HR.py @@ -232,7 +232,6 @@ class TestHR(ERP5TypeTestCase): category_type = 'Category' base_path_obj.newContent( portal_type = category_type , id = category_id - , immediate_reindex = 1 ) base_path_obj = base_path_obj[category_id] is_base_category = False @@ -273,7 +272,6 @@ class TestHR(ERP5TypeTestCase): portal_type = 'Organisation' organisation_module = self.portal.getDefaultModule(portal_type) organisation = organisation_module.newContent(portal_type=portal_type, - immediate_reindex=1, title='A new organisation') sequence.edit(organisation = organisation) @@ -469,7 +467,6 @@ class TestHR(ERP5TypeTestCase): portal_type = 'Person' person_module = self.portal.getDefaultModule(portal_type) person = person_module.newContent( portal_type = portal_type - , immediate_reindex = 1 ) sequence.edit(person = person) diff --git a/product/ERP5Type/tests/testXMLMatrix.py b/product/ERP5Type/tests/testXMLMatrix.py index 0200e87ff8..7ad405e4d2 100644 --- a/product/ERP5Type/tests/testXMLMatrix.py +++ b/product/ERP5Type/tests/testXMLMatrix.py @@ -188,15 +188,21 @@ class TestXMLMatrix(ERP5TypeTestCase): self.assertEqual(getattr(cell, 'test_id', None), value_list[i]) i += 1 - def checkSetCellRangeAndCatalog(self,active=1): + def checkSetCellRangeAndCatalog(self, active=1): """ Tests if set Cell range do well catalog and uncatalog """ portal = self.getPortal() + module = portal.purchase_order_module if not active: + # FIXME: deleting portal_activities prevent from running another test + # after this one (because this methods commits the transaction) portal._delObject('portal_activities') - module = portal.purchase_order_module - module.recursiveImmediateReindexObject() + module.recursiveImmediateReindexObject() + else: + module.recursiveReindexObject() + get_transaction().commit() + self.tic() catalog = portal.portal_catalog order = module._getOb('1') -- 2.30.9