Commit bd8a92fe authored by Łukasz Nowak's avatar Łukasz Nowak

- simplify deletion of previous data


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@43432 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 864f6b97
......@@ -108,13 +108,13 @@ class TestOOoImportMixin(ERP5TypeTestCase):
def beforeTearDown(self):
transaction.abort()
region = self.portal.portal_categories.region
region.manage_delObjects(list(region.objectIds()))
for parent in [
self.portal.portal_categories.region,
self.portal.portal_categories.gender,
self.portal.portal_categories.function,
]:
parent.deleteContent(list(parent.objectIds()))
self.portal.portal_preferences.manage_delObjects([self.pref.getId()])
gender = self.portal.portal_categories.gender
function = self.portal.portal_categories.function
gender.manage_delObjects(list(gender.objectIds()))
function.manage_delObjects(list(function.objectIds()))
transaction.commit()
self.tic()
......
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