Commit 9af75b60 authored by Vincent Pelletier's avatar Vincent Pelletier

testERP5Catalog: Check that deleting "a/b" then "a" unindexes both.

parent 8feed257
...@@ -185,10 +185,17 @@ class TestERP5Catalog(ERP5TypeTestCase, LogInterceptor): ...@@ -185,10 +185,17 @@ class TestERP5Catalog(ERP5TypeTestCase, LogInterceptor):
portal_catalog = self.getCatalogTool() portal_catalog = self.getCatalogTool()
person_module = self.getPersonModule() person_module = self.getPersonModule()
person = person_module.newContent(id='1',portal_type='Person') person = person_module.newContent(id='1',portal_type='Person')
path_list = [person.getRelativeUrl()] address = person.newContent(portal_type='Address')
path_list = [person.getRelativeUrl(), address.getRelativeUrl()]
self.checkRelativeUrlNotInSQLPathList(path_list) self.checkRelativeUrlNotInSQLPathList(path_list)
self.tic() self.tic()
self.checkRelativeUrlInSQLPathList(path_list) self.checkRelativeUrlInSQLPathList(path_list)
# Delete subobject in a first transaction, then do not tic and...
person.manage_delObjects(ids=[address.getId()])
self.commit()
# ...delete its container in another transaction, to check that both
# do get properly unindexed (subobject's unindexation does not get
# deleted when deleting its container).
person_module.manage_delObjects('1') person_module.manage_delObjects('1')
self.tic() self.tic()
self.checkRelativeUrlNotInSQLPathList(path_list) self.checkRelativeUrlNotInSQLPathList(path_list)
......
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