Commit db0ee9b5 authored by Vincent Pelletier's avatar Vincent Pelletier

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

parent f3263e9d
......@@ -185,10 +185,17 @@ class TestERP5Catalog(ERP5TypeTestCase, LogInterceptor):
portal_catalog = self.getCatalogTool()
person_module = self.getPersonModule()
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.tic()
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')
self.tic()
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