Commit b3f92b07 authored by Jérome Perrin's avatar Jérome Perrin

check if category already exists before creating it (usefull for some --load)


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@24437 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent aafb5935
......@@ -113,7 +113,9 @@ class TestPerformance(ERP5TypeTestCase, LogInterceptor):
if prefix is None:
prefix = ''
gender = self.getPortal().portal_categories['gender']
if 'male' not in gender.objectIds():
gender.newContent(id='male', title='Male', portal_type='Category')
if 'female' not in gender.objectIds():
gender.newContent(id='female', title='Female', portal_type='Category')
bar = self.bar_module.newContent(id='bar',
......
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