Commit 394d8d46 authored by Sebastien Robin's avatar Sebastien Robin

make sure some categories are not already there


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@4165 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent b18e89e5
......@@ -134,10 +134,15 @@ class TestCMFCategory(ERP5TypeTestCase):
portal_categories[bc].setAcquisitionAppendValue(0)
portal_categories[bc].setAcquisitionObjectIdList(['default_address'])
if not 'europe' in portal_categories[bc].objectIds():
big_region = portal_categories[bc].newContent(id='europe',portal_type='Category')
# Now we have to include by hand no categories
region = big_region.newContent(id='west',portal_type='Category')
portal_categories[bc].newContent(id='europe',portal_type='Category')
big_region = portal_categories[bc]['europe']
# Now we have to include by hand no categories
if not 'west' in big_region.objectIds():
big_region.newContent(id='west',portal_type='Category')
region = big_region['west']
if not 'france' in region.objectIds():
region.newContent(id='france',portal_type='Category')
if not 'germany' in region.objectIds():
region.newContent(id='germany',portal_type='Category')
for bc in ('subordination', ):
if not hasattr(portal_categories, bc):
......
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