Commit 25201f8a authored by Jérome Perrin's avatar Jérome Perrin

stop passing immediate_reindex=1 to newContent this API should not exist


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@33809 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 89fe9e68
......@@ -2954,8 +2954,7 @@ class TestAccountingWithSequences(ERP5TypeTestCase):
if not cat in path.objectIds():
path = path.newContent(
portal_type='Category',
id=cat,
immediate_reindex=1)
id=cat,)
else:
path = path[cat]
......
......@@ -170,8 +170,7 @@ class InventoryAPITestCase(ERP5TypeTestCase):
if not cat in path.objectIds() :
path = path.newContent(
portal_type='Category',
id=cat,
immediate_reindex=1 )
id=cat,)
else:
path = path[cat]
# check categories have been created
......@@ -179,6 +178,8 @@ class InventoryAPITestCase(ERP5TypeTestCase):
self.assertNotEquals(None,
self.getCategoryTool().restrictedTraverse(cat_string),
cat_string)
transaction.commit()
self.tic()
def getNeededCategoryList(self):
"""return a list of categories that should be created."""
......@@ -2319,8 +2320,7 @@ class BaseTestUnitConversion(InventoryAPITestCase):
group = unit_module.newContent(
id=base,
portal_type='Quantity Unit Conversion Group',
quantity_unit="%s/%s" % (base, standard),
immediate_reindex=1 )
quantity_unit="%s/%s" % (base, standard),)
if group.getValidationState() in ('draft', 'invalidated'):
group.validate()
......@@ -2331,8 +2331,7 @@ class BaseTestUnitConversion(InventoryAPITestCase):
id=unit,
portal_type="Quantity Unit Conversion Definition",
quantity_unit="%s/%s" % (base, unit),
quantity=amount,
immediate_reindex=1)
quantity=amount,)
if definition.getValidationState() in ('draft', 'invalidated'):
definition.validate()
......@@ -2342,12 +2341,12 @@ class BaseTestUnitConversion(InventoryAPITestCase):
self.setUpUnitDefinition()
self._safeTic()
@reindex
def makeMovement(self, quantity, resource, *variation, **kw):
m = self._makeMovement(quantity=quantity, resource_value=resource,
source_value=self.node, destination_value=self.mirror_node, **kw)
if variation:
m.setVariationCategoryList(variation)
self._safeTic()
def convertedSimulation(self, metric_type, **kw):
return self.getSimulationTool().getInventory(
......@@ -2500,16 +2499,14 @@ class TestUnitConversionDefinition(BaseTestUnitConversion):
base_unit = self.resource_bylot_overriding.newContent(
portal_type='Quantity Unit Conversion Group',
quantity_unit='unit/unit',
immediate_reindex=1)
quantity_unit='unit/unit',)
base_unit.validate()
unit = base_unit.newContent(
portal_type='Quantity Unit Conversion Definition',
quantity_unit='unit/lot',
quantity=50,
immediate_reindex=1)
quantity=50,)
unit.validate()
self._safeTic()
......
......@@ -113,8 +113,7 @@ class TestInvoiceVAT(ERP5TypeTestCase):
if not cat in path.objectIds() :
path = path.newContent(
portal_type='Category',
id=cat,
immediate_reindex=1 )
id=cat,)
else:
path = path[cat]
# check categories have been created
......
......@@ -84,8 +84,7 @@ class TestPredicateMixIn(ERP5TypeTestCase):
if not cat in path.objectIds() :
path = path.newContent(
portal_type = 'Category',
id = cat,
immediate_reindex = 1 )
id = cat,)
else :
path = path[cat]
......@@ -94,6 +93,8 @@ class TestPredicateMixIn(ERP5TypeTestCase):
self.assertNotEquals(None,
self.getCategoryTool().restrictedTraverse(cat_string),
cat_string)
transaction.commit()
self.tic()
def getNeededCategoryList(self):
"""return a list of categories that should be created."""
......
......@@ -195,8 +195,8 @@ class TestERP5Catalog(ERP5TypeTestCase, LogInterceptor):
self.checkRelativeUrlNotInSQLPathList(path_list)
# Now we will ask to immediatly reindex
person = person_module.newContent(id='2',
portal_type='Person',
immediate_reindex=1)
portal_type='Person',)
person.immediateReindexObject()
path_list = [person.getRelativeUrl()]
self.checkRelativeUrlInSQLPathList(path_list)
person.immediateReindexObject()
......@@ -228,7 +228,8 @@ class TestERP5Catalog(ERP5TypeTestCase, LogInterceptor):
# Now we will try the same thing as previous test and look at searchFolder
folder_object_list = [x.getObject().getId() for x in person_module.searchFolder()]
self.assertEquals([],folder_object_list)
person = person_module.newContent(id='4',portal_type='Person',immediate_reindex=1)
person = person_module.newContent(id='4',portal_type='Person',)
person.immediateReindexObject()
folder_object_list = [x.getObject().getId() for x in person_module.searchFolder()]
self.assertEquals(['4'],folder_object_list)
person.immediateReindexObject()
......@@ -300,7 +301,8 @@ class TestERP5Catalog(ERP5TypeTestCase, LogInterceptor):
portal_catalog = self.getCatalogTool()
portal_catalog.manage_catalogClear()
person = person_module.newContent(id='4',portal_type='Person',immediate_reindex=1)
person = person_module.newContent(id='4',portal_type='Person')
person.immediateReindexObject()
folder_object_list = [x.getObject().getId() for x in person_module.searchFolder()]
self.assertEquals(['4'],folder_object_list)
......@@ -910,8 +912,8 @@ class TestERP5Catalog(ERP5TypeTestCase, LogInterceptor):
person_module = self.getPersonModule()
# Now we will ask to immediatly reindex
person = person_module.newContent(id='2',
portal_type='Person',
immediate_reindex=1)
portal_type='Person',)
person.immediateReindexObject()
path_list = [person.getRelativeUrl()]
self.checkRelativeUrlInSQLPathList(path_list)
# We will delete the connector
......
......@@ -206,7 +206,6 @@ class TestIngestion(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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment