Commit 45d9bebe authored by Aurel's avatar Aurel

add parameter to specify wich site category we want to install


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@10805 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 7dcf340c
...@@ -433,7 +433,7 @@ class TestERP5BankingMixin: ...@@ -433,7 +433,7 @@ class TestERP5BankingMixin:
price_currency_value=self.currency_2, variation_list=('not_defined',), price_currency_value=self.currency_2, variation_list=('not_defined',),
quantity_unit_value=self.unit) quantity_unit_value=self.unit)
def createFunctionGroupSiteCategory(self, no_site=0): def createFunctionGroupSiteCategory(self, no_site=0, site_list=[]):
""" """
Create site group function category that can be used for security Create site group function category that can be used for security
""" """
...@@ -476,8 +476,17 @@ class TestERP5BankingMixin: ...@@ -476,8 +476,17 @@ class TestERP5BankingMixin:
self.site_base_category = getattr(self.category_tool, 'site') self.site_base_category = getattr(self.category_tool, 'site')
# add the category testsite in the category site which hold vaults situated in the bank # add the category testsite in the category site which hold vaults situated in the bank
self.testsite = self.site_base_category.newContent(id='testsite', portal_type='Category',codification='TEST',vault_type='site') self.testsite = self.site_base_category.newContent(id='testsite', portal_type='Category',codification='TEST',vault_type='site')
if len(site_list) != 0:
if 'paris' in site_list:
self.paris = self.testsite.newContent(id='paris', portal_type='Category', codification='P1', vault_type='site') self.paris = self.testsite.newContent(id='paris', portal_type='Category', codification='P1', vault_type='site')
if 'madrid' in site_list:
self.madrid = self.testsite.newContent(id='madrid', portal_type='Category', codification='S1', vault_type='site') self.madrid = self.testsite.newContent(id='madrid', portal_type='Category', codification='S1', vault_type='site')
if 'siege' in site_list:
self.siege = self.testsite.newContent(id='siege', portal_type='Category', codification='HQ1', vault_type='site')
else:
self.paris = self.testsite.newContent(id='paris', portal_type='Category', codification='P1', vault_type='site')
self.madrid = self.testsite.newContent(id='madrid', portal_type='Category', codification='S1', vault_type='site')
self.siege = self.testsite.newContent(id='siege', portal_type='Category', codification='HQ1', vault_type='site')
if not no_site: if not no_site:
for c in self.testsite.getCategoryChildValueList(): for c in self.testsite.getCategoryChildValueList():
......
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