Commit c7326735 authored by Sebastien Robin's avatar Sebastien Robin

the type of the line portal type was not well defined

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@13385 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent ab4c3e68
......@@ -64,6 +64,7 @@ class TestImmobilisationMixin(TestOrderMixin, ERP5TypeTestCase):
# Different variables used for this test
item_portal_type = 'Apparel Fabric Item'
packing_list_portal_type = 'Purchase Packing List'
packing_list_line_portal_type = 'Purchase Packing List Line'
internal_packing_list_portal_type = 'Internal Packing List'
sale_packing_list_portal_type = 'Sale Packing List'
inventory_portal_type = 'Inventory'
......@@ -133,7 +134,8 @@ class TestImmobilisationMixin(TestOrderMixin, ERP5TypeTestCase):
This user will be used to initialize data in the method afterSetup
"""
all_roles = ['Manager','Assignor','Assignee','Author','Associate','Auditor']
self.getUserFolder()._doAddUser('manager', '', all_roles, [])
if not "manager" in [x.id for x in self.getUserFolder().objectValues()]:
self.getUserFolder()._doAddUser('manager', '', all_roles, [])
self.login('manager')
self.assignPASRolesToUser('test_user_1_', all_roles)
......@@ -320,8 +322,9 @@ class TestImmobilisationMixin(TestOrderMixin, ERP5TypeTestCase):
Create a category tree
"""
for category, codification, new_tree in category_tree:
new_category = current_category.newContent(portal_type='Category', id=category, codification=codification)
self.createCategoryTree(new_category, new_tree)
if category not in current_category.objectIds():
new_category = current_category.newContent(portal_type='Category', id=category, codification=codification)
self.createCategoryTree(new_category, new_tree)
def createCategorySiteTree(self, current_category, category_tree):
"""
......
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