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:
price_currency_value=self.currency_2, variation_list=('not_defined',),
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
"""
......@@ -476,9 +476,18 @@ class TestERP5BankingMixin:
self.site_base_category = getattr(self.category_tool, 'site')
# 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.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')
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')
if 'madrid' in site_list:
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:
for c in self.testsite.getCategoryChildValueList():
# create bank structure for each agency
......
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