Commit bf4856f9 authored by Rafael Monnerat's avatar Rafael Monnerat

Refactor workflow to elimate initial dependencies and install dependencies...

Refactor workflow to elimate initial dependencies and install dependencies during the configuration process.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@44324 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent c0658002
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Base Category" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_Add_portal_content_Permission</string> </key>
<value>
<tuple>
<string>Assignor</string>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>_Add_portal_folders_Permission</string> </key>
<value>
<tuple>
<string>Assignor</string>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>_Copy_or_Move_Permission</string> </key>
<value>
<tuple>
<string>Assignor</string>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>_Delete_objects_Permission</string> </key>
<value>
<tuple>
<string>Assignor</string>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>_Modify_portal_content_Permission</string> </key>
<value>
<tuple>
<string>Assignee</string>
<string>Assignor</string>
<string>Manager</string>
<string>Owner</string>
</tuple>
</value>
</item>
<item>
<key> <string>_count</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>_mt_index</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item>
<item>
<key> <string>_tree</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAQ=</string> </persistent>
</value>
</item>
<item>
<key> <string>acquisition_append_value</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>acquisition_base_category</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>acquisition_copy_value</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>acquisition_mask_value</string> </key>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>acquisition_object_id</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>acquisition_portal_type</string> </key>
<value> <string>python: []</string> </value>
</item>
<item>
<key> <string>acquisition_sync_value</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>categories</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>category_type</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>criterion_property</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string>WARNING: do not modify Ids for this base category. Id is used in many places in accounting. This base category should be read-only.\n
You can still safely change Title or (better) translate it using Localizer</string> </value>
</item>
<item>
<key> <string>fallback_base_category</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>account_type</string> </value>
</item>
<item>
<key> <string>id_generator</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id_group</string> </key>
<value> <string>None</string> </value>
</item>
<item>
<key> <string>last_id</string> </key>
<value> <string>1</string> </value>
</item>
<item>
<key> <string>membership_criterion_base_category</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>membership_criterion_category</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>multimembership_criterion_base_category</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Base Category</string> </value>
</item>
<item>
<key> <string>read_permission</string> </key>
<value> <string>None</string> </value>
</item>
<item>
<key> <string>rid</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>short_title</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>sid</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>test_method_id</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Account Type</string> </value>
</item>
<item>
<key> <string>write_permission</string> </key>
<value> <string>None</string> </value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="Length" module="BTrees.Length"/>
</pickle>
<pickle> <int>0</int> </pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<global name="OOBTree" module="BTrees.OOBTree"/>
</pickle>
<pickle>
<none/>
</pickle>
</record>
<record id="4" aka="AAAAAAAAAAQ=">
<pickle>
<global name="OOBTree" module="BTrees.OOBTree"/>
</pickle>
<pickle>
<none/>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Base Category" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_Add_portal_content_Permission</string> </key>
<value>
<tuple>
<string>Assignor</string>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>_Add_portal_folders_Permission</string> </key>
<value>
<tuple>
<string>Assignor</string>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>_Copy_or_Move_Permission</string> </key>
<value>
<tuple>
<string>Assignor</string>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>_Delete_objects_Permission</string> </key>
<value>
<tuple>
<string>Assignor</string>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>_Modify_portal_content_Permission</string> </key>
<value>
<tuple>
<string>Assignee</string>
<string>Assignor</string>
<string>Manager</string>
<string>Owner</string>
</tuple>
</value>
</item>
<item>
<key> <string>_count</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>_mt_index</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item>
<item>
<key> <string>_tree</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAQ=</string> </persistent>
</value>
</item>
<item>
<key> <string>acquisition_append_value</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>acquisition_base_category</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>acquisition_copy_value</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>acquisition_mask_value</string> </key>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>acquisition_object_id</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>acquisition_portal_type</string> </key>
<value> <string>python: []</string> </value>
</item>
<item>
<key> <string>acquisition_sync_value</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>categories</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>category_type</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>criterion_property</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>fallback_base_category</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>financial_section</string> </value>
</item>
<item>
<key> <string>id_generator</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id_group</string> </key>
<value> <string>None</string> </value>
</item>
<item>
<key> <string>last_id</string> </key>
<value> <string>1</string> </value>
</item>
<item>
<key> <string>membership_criterion_base_category</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>membership_criterion_category</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>multimembership_criterion_base_category</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Base Category</string> </value>
</item>
<item>
<key> <string>read_permission</string> </key>
<value> <string>None</string> </value>
</item>
<item>
<key> <string>rid</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>short_title</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>sid</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>test_method_id</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Financial Section</string> </value>
</item>
<item>
<key> <string>write_permission</string> </key>
<value> <string>None</string> </value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="Length" module="BTrees.Length"/>
</pickle>
<pickle> <int>0</int> </pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<global name="OOBTree" module="BTrees.OOBTree"/>
</pickle>
<pickle>
<none/>
</pickle>
</record>
<record id="4" aka="AAAAAAAAAAQ=">
<pickle>
<global name="OOBTree" module="BTrees.OOBTree"/>
</pickle>
<pickle>
<none/>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Base Category" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_Add_portal_content_Permission</string> </key>
<value>
<tuple>
<string>Assignor</string>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>_Add_portal_folders_Permission</string> </key>
<value>
<tuple>
<string>Assignor</string>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>_Copy_or_Move_Permission</string> </key>
<value>
<tuple>
<string>Assignor</string>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>_Delete_objects_Permission</string> </key>
<value>
<tuple>
<string>Assignor</string>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>_Modify_portal_content_Permission</string> </key>
<value>
<tuple>
<string>Assignee</string>
<string>Assignor</string>
<string>Manager</string>
<string>Owner</string>
</tuple>
</value>
</item>
<item>
<key> <string>_count</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>_mt_index</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item>
<item>
<key> <string>_tree</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAQ=</string> </persistent>
</value>
</item>
<item>
<key> <string>acquisition_append_value</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>acquisition_base_category</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>acquisition_copy_value</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>acquisition_mask_value</string> </key>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>acquisition_object_id</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>acquisition_portal_type</string> </key>
<value> <string>python: []</string> </value>
</item>
<item>
<key> <string>acquisition_sync_value</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>categories</string> </key>
<value>
<tuple>
<string>gap</string>
</tuple>
</value>
</item>
<item>
<key> <string>category_type</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>criterion_property</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>fallback_base_category</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>gap</string> </value>
</item>
<item>
<key> <string>id_generator</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id_group</string> </key>
<value> <string>None</string> </value>
</item>
<item>
<key> <string>last_id</string> </key>
<value> <string>1</string> </value>
</item>
<item>
<key> <string>membership_criterion_base_category</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>membership_criterion_category</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>multimembership_criterion_base_category</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Base Category</string> </value>
</item>
<item>
<key> <string>read_permission</string> </key>
<value> <string>None</string> </value>
</item>
<item>
<key> <string>rid</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>short_title</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>sid</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>test_method_id</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>General Accounting Plan</string> </value>
</item>
<item>
<key> <string>write_permission</string> </key>
<value> <string>None</string> </value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="Length" module="BTrees.Length"/>
</pickle>
<pickle> <int>0</int> </pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<global name="OOBTree" module="BTrees.OOBTree"/>
</pickle>
<pickle>
<none/>
</pickle>
</record>
<record id="4" aka="AAAAAAAAAAQ=">
<pickle>
<global name="OOBTree" module="BTrees.OOBTree"/>
</pickle>
<pickle>
<none/>
</pickle>
</record>
</ZopeData>
...@@ -53,8 +53,21 @@ ...@@ -53,8 +53,21 @@
<value> <string>configuration_save = context.restrictedTraverse(configuration_save_url)\n <value> <string>configuration_save = context.restrictedTraverse(configuration_save_url)\n
\n \n
# specify is bt5 is a public or not\n # specify is bt5 is a public or not\n
bt5_installation_list = ((\'erp5_configurator_standard_categories\', True,),\n bt5_installation_list = ((\'erp5_simulation\', True,),\n
)\n (\'erp5_dhtml_style\', True,),\n
(\'erp5_jquery\', True,),\n
(\'erp5_jquery_ui\', True,),\n
(\'erp5_xhtml_jquery_style\', True,),\n
(\'erp5_crm\', True,), \n
(\'erp5_pdm\', True,),\n
(\'erp5_trade\', True),\n
(\'erp5_knowledge_pad\', True),\n
(\'erp5_accounting\', True),\n
(\'erp5_tax_resource\', True),\n
(\'erp5_discount_resource\',True),\n
(\'erp5_invoicing\', True),\n
(\'erp5_configurator_standard_categories\', True,),\n
)\n
\n \n
for name in bt5_installation_list:\n for name in bt5_installation_list:\n
configuration_save.addConfigurationItem("Standard BT5 Configurator Item",\n configuration_save.addConfigurationItem("Standard BT5 Configurator Item",\n
......
...@@ -46,31 +46,30 @@ class TestLiveConfiguratorWorkflowMixin(SecurityTestCase): ...@@ -46,31 +46,30 @@ class TestLiveConfiguratorWorkflowMixin(SecurityTestCase):
""" """
# The list of standard business templates that the configurator should force # The list of standard business templates that the configurator should force
# to install # to install
standard_bt5_list = ('erp5_configurator_standard_categories',) standard_bt5_list = ('erp5_simulation',
'erp5_dhtml_style',
'erp5_jquery',
'erp5_jquery_ui',
'erp5_xhtml_jquery_style',
'erp5_crm',
'erp5_pdm',
'erp5_trade',
'erp5_knowledge_pad',
'erp5_accounting',
'erp5_tax_resource',
'erp5_discount_resource',
'erp5_invoicing',
'erp5_configurator_standard_categories')
def getBusinessTemplateList(self): def getBusinessTemplateList(self):
return ('erp5_core_proxy_field_legacy', return ('erp5_core_proxy_field_legacy',
'erp5_base', 'erp5_base',
'erp5_simulation',
'erp5_dhtml_style',
'erp5_jquery',
'erp5_jquery_ui',
'erp5_xhtml_jquery_style',
'erp5_web', 'erp5_web',
'erp5_ingestion',
'erp5_ingestion_mysql_innodb_catalog', 'erp5_ingestion_mysql_innodb_catalog',
'erp5_accounting', 'erp5_ingestion',
'erp5_dms', 'erp5_dms',
'erp5_knowledge_pad',
'erp5_pdm',
'erp5_crm',
'erp5_trade',
'erp5_tax_resource',
'erp5_discount_resource',
'erp5_invoicing',
'erp5_workflow', 'erp5_workflow',
'erp5_configurator', 'erp5_configurator',
'erp5_configurator_standard_categories',
'erp5_configurator_standard',) 'erp5_configurator_standard',)
def stepLogin(self, quiet=0, run=1, **kw): def stepLogin(self, quiet=0, run=1, **kw):
...@@ -141,7 +140,7 @@ class TestLiveConfiguratorWorkflowMixin(SecurityTestCase): ...@@ -141,7 +140,7 @@ class TestLiveConfiguratorWorkflowMixin(SecurityTestCase):
response_dict = self.portal.portal_configurator._next( response_dict = self.portal.portal_configurator._next(
business_configuration, next_dict) business_configuration, next_dict)
sequence.edit(response_dict=response_dict) sequence.edit(response_dict=response_dict)
def stepConfiguratorPrevious(self, sequence=None, sequence_list=None, **kw): def stepConfiguratorPrevious(self, sequence=None, sequence_list=None, **kw):
""" Go to the previous form. """ """ Go to the previous form. """
business_configuration = sequence.get("business_configuration") business_configuration = sequence.get("business_configuration")
...@@ -222,7 +221,8 @@ class TestLiveConfiguratorWorkflowMixin(SecurityTestCase): ...@@ -222,7 +221,8 @@ class TestLiveConfiguratorWorkflowMixin(SecurityTestCase):
sequence.edit(next_dict=next_dict) sequence.edit(next_dict=next_dict)
def stepCheckMultiplePersonConfigurationItem(self, sequence=None, sequence_list=None, **kw): def stepCheckMultiplePersonConfigurationItem(self, sequence=None, sequence_list=None, **kw):
"""Check if multiple Person Configuration Item of the Business """
Check if multiple Person Configuration Item of the Business
Configuration have been created successfully. Configuration have been created successfully.
""" """
business_configuration = sequence.get("business_configuration") business_configuration = sequence.get("business_configuration")
...@@ -240,6 +240,7 @@ class TestLiveConfiguratorWorkflowMixin(SecurityTestCase): ...@@ -240,6 +240,7 @@ class TestLiveConfiguratorWorkflowMixin(SecurityTestCase):
person_business_configuration_save = configuration_save person_business_configuration_save = configuration_save
break break
self.assertEquals(int(self.company_employees_number), self.assertEquals(int(self.company_employees_number),
len(person_business_configuration_save.contentValues())) len(person_business_configuration_save.contentValues()))
return person_business_configuration_save return person_business_configuration_save
...@@ -248,7 +249,7 @@ class TestLiveConfiguratorWorkflowMixin(SecurityTestCase): ...@@ -248,7 +249,7 @@ class TestLiveConfiguratorWorkflowMixin(SecurityTestCase):
""" Check the accounting form configuration. """ """ Check the accounting form configuration. """
response_dict = sequence.get("response_dict") response_dict = sequence.get("response_dict")
if 'command' in response_dict: if 'command' in response_dict:
self.assertEquals('show', response_dict['command']) self.assertEquals('show', response_dict['command'])
self.assertEquals('Previous', response_dict['previous']) self.assertEquals('Previous', response_dict['previous'])
self.assertEquals('Configure accounting', response_dict['next']) self.assertEquals('Configure accounting', response_dict['next'])
self.assertCurrentStep('Accounting', response_dict) self.assertCurrentStep('Accounting', response_dict)
...@@ -311,7 +312,7 @@ class TestLiveConfiguratorWorkflowMixin(SecurityTestCase): ...@@ -311,7 +312,7 @@ class TestLiveConfiguratorWorkflowMixin(SecurityTestCase):
self.assertEquals(self.preference_group, self.assertEquals(self.preference_group,
preference_buisiness_configurator_item.getProperty( preference_buisiness_configurator_item.getProperty(
'preferred_accounting_transaction_section_category')) 'preferred_accounting_transaction_section_category'))
# 3. some pre-configured accounts # 3. some pre-configured accounts
account_business_configuration_item =\ account_business_configuration_item =\
accounting_business_configuration_save['2'] accounting_business_configuration_save['2']
...@@ -335,7 +336,7 @@ class TestLiveConfiguratorWorkflowMixin(SecurityTestCase): ...@@ -335,7 +336,7 @@ class TestLiveConfiguratorWorkflowMixin(SecurityTestCase):
# this ['14'] will break when we'll add more accounts # this ['14'] will break when we'll add more accounts
self.assertEquals('Accounting Period Configurator Item', self.assertEquals('Accounting Period Configurator Item',
accounting_period_configuration_item.getPortalType()) accounting_period_configuration_item.getPortalType())
self.assertEquals(DateTime(2008, 1, 1), self.assertEquals(DateTime(2008, 1, 1),
accounting_period_configuration_item.getStartDate()) accounting_period_configuration_item.getStartDate())
self.assertEquals(DateTime(2008, 12, 31), self.assertEquals(DateTime(2008, 12, 31),
...@@ -394,7 +395,7 @@ class TestLiveConfiguratorWorkflowMixin(SecurityTestCase): ...@@ -394,7 +395,7 @@ class TestLiveConfiguratorWorkflowMixin(SecurityTestCase):
# this created a currency # this created a currency
preferences_business_configuration_save = business_configuration.\ preferences_business_configuration_save = business_configuration.\
contentValues(portal_types='Configuration Save')[-1] contentValues(portal_types='Configuration Save')[-1]
currency_business_configuration_item =\ currency_business_configuration_item =\
preferences_business_configuration_save['1'] preferences_business_configuration_save['1']
self.assertEquals('Currency Configurator Item', self.assertEquals('Currency Configurator Item',
...@@ -493,6 +494,7 @@ class TestLiveConfiguratorWorkflowMixin(SecurityTestCase): ...@@ -493,6 +494,7 @@ class TestLiveConfiguratorWorkflowMixin(SecurityTestCase):
expected_list = self.standard_bt5_list + bt5_tuple expected_list = self.standard_bt5_list + bt5_tuple
self.assertEquals([i for i in expected_list if i not in bt5_title_list], []) self.assertEquals([i for i in expected_list if i not in bt5_title_list], [])
self.assertFalse(bc_id in bt5_title_list) self.assertFalse(bc_id in bt5_title_list)
bt = business_configuration.getSpecialiseValue(portal_type="Business Template") bt = business_configuration.getSpecialiseValue(portal_type="Business Template")
...@@ -500,19 +502,11 @@ class TestLiveConfiguratorWorkflowMixin(SecurityTestCase): ...@@ -500,19 +502,11 @@ class TestLiveConfiguratorWorkflowMixin(SecurityTestCase):
self.assertEquals(bt.getInstallationState(), 'not_installed') self.assertEquals(bt.getInstallationState(), 'not_installed')
self.assertEquals(bt.getBuildingState(), 'built') self.assertEquals(bt.getBuildingState(), 'built')
# check for links
link_list = business_configuration.searchFolder(portal_type="Link")
self.assertEquals(3, len(link_list))
expected_link_title_list = list(bt5_tuple) +\
['erp5_configurator_standard_categories']
self.assertSameSet(["%s.bt5" % i for i in expected_link_title_list],
[i.getTitle() for i in link_list])
# check for links # check for links
file_list = business_configuration.searchFolder(portal_type="File") file_list = business_configuration.searchFolder(portal_type="File")
self.assertEquals(1, len(file_list)) self.assertEquals(1, len(file_list))
self.assertEquals(business_configuration.getSpecialiseTitle(), self.assertEquals(business_configuration.getSpecialiseTitle(),
file_list[0].getTitle()) file_list[0].getTitle())
file_title_list = ('%s' % bc_id,) file_title_list = ('%s' % bc_id,)
...@@ -546,7 +540,7 @@ class TestConsultingConfiguratorWorkflow(TestLiveConfiguratorWorkflowMixin): ...@@ -546,7 +540,7 @@ class TestConsultingConfiguratorWorkflow(TestLiveConfiguratorWorkflowMixin):
""" """
DEFAULT_SEQUENCE_LIST = """ DEFAULT_SEQUENCE_LIST = """
stepCreateBusinessConfiguration stepCreateBusinessConfiguration
stepTic stepTic
stepSetConsultingWorkflow stepSetConsultingWorkflow
stepTic stepTic
...@@ -658,7 +652,7 @@ class TestConsultingConfiguratorWorkflow(TestLiveConfiguratorWorkflowMixin): ...@@ -658,7 +652,7 @@ class TestConsultingConfiguratorWorkflow(TestLiveConfiguratorWorkflowMixin):
] ]
# set preference group # set preference group
self.preference_group = 'group/g' self.preference_group = 'group/g'
def beforeTearDown(self): def beforeTearDown(self):
os.remove(self.categories_file_path) os.remove(self.categories_file_path)
...@@ -671,7 +665,7 @@ class TestConsultingConfiguratorWorkflow(TestLiveConfiguratorWorkflowMixin): ...@@ -671,7 +665,7 @@ class TestConsultingConfiguratorWorkflow(TestLiveConfiguratorWorkflowMixin):
portal_type="Business Configuration", portal_type="Business Configuration",
title='Test Configurator Consulting Workflow') title='Test Configurator Consulting Workflow')
next_dict = {} next_dict = {}
sequence.edit(business_configuration=business_configuration, sequence.edit(business_configuration=business_configuration,
next_dict=next_dict) next_dict=next_dict)
def stepSetConsultingWorkflow(self, sequence=None, sequence_list=None, **kw): def stepSetConsultingWorkflow(self, sequence=None, sequence_list=None, **kw):
...@@ -771,7 +765,7 @@ class TestConsultingConfiguratorWorkflow(TestLiveConfiguratorWorkflowMixin): ...@@ -771,7 +765,7 @@ class TestConsultingConfiguratorWorkflow(TestLiveConfiguratorWorkflowMixin):
self.assertEquals(0, len(link_list)) self.assertEquals(0, len(link_list))
def stepCheckMultiplePersonConfigurationItem(self, sequence=None, sequence_list=None, **kw): def stepCheckMultiplePersonConfigurationItem(self, sequence=None, sequence_list=None, **kw):
""" """
Check if multiple Person Configuration Item of the Business Check if multiple Person Configuration Item of the Business
Configuration have been created successfully. Configuration have been created successfully.
""" """
...@@ -837,7 +831,7 @@ class TestStandardConfiguratorWorkflow(TestLiveConfiguratorWorkflowMixin): ...@@ -837,7 +831,7 @@ class TestStandardConfiguratorWorkflow(TestLiveConfiguratorWorkflowMixin):
Test Live Standard Configuration Workflow. Test Live Standard Configuration Workflow.
""" """
DEFAULT_SEQUENCE_LIST = """ DEFAULT_SEQUENCE_LIST = """
stepCreateBusinessConfiguration stepCreateBusinessConfiguration
stepTic stepTic
stepSetStandardWorkflow stepSetStandardWorkflow
stepTic stepTic
...@@ -971,7 +965,7 @@ class TestStandardConfiguratorWorkflow(TestLiveConfiguratorWorkflowMixin): ...@@ -971,7 +965,7 @@ class TestStandardConfiguratorWorkflow(TestLiveConfiguratorWorkflowMixin):
), ),
] ]
# set preference group # set preference group
self.preference_group = 'group/my_group' self.preference_group = 'group/my_group'
def stepCreateBusinessConfiguration(self, sequence=None, sequence_list=None, **kw): def stepCreateBusinessConfiguration(self, sequence=None, sequence_list=None, **kw):
""" Create one Business Configuration """ """ Create one Business Configuration """
...@@ -980,7 +974,7 @@ class TestStandardConfiguratorWorkflow(TestLiveConfiguratorWorkflowMixin): ...@@ -980,7 +974,7 @@ class TestStandardConfiguratorWorkflow(TestLiveConfiguratorWorkflowMixin):
portal_type="Business Configuration", portal_type="Business Configuration",
title='Test Configurator Standard Workflow') title='Test Configurator Standard Workflow')
next_dict = {} next_dict = {}
sequence.edit(business_configuration=business_configuration, sequence.edit(business_configuration=business_configuration,
next_dict=next_dict) next_dict=next_dict)
def stepSetStandardWorkflow(self, sequence=None, sequence_list=None, **kw): def stepSetStandardWorkflow(self, sequence=None, sequence_list=None, **kw):
...@@ -1059,7 +1053,7 @@ class TestStandardConfiguratorWorkflow(TestLiveConfiguratorWorkflowMixin): ...@@ -1059,7 +1053,7 @@ class TestStandardConfiguratorWorkflow(TestLiveConfiguratorWorkflowMixin):
default_address_region='americas/south_america/brazil') default_address_region='americas/south_america/brazil')
def stepCheckMultiplePersonConfigurationItem(self, sequence=None, sequence_list=None, **kw): def stepCheckMultiplePersonConfigurationItem(self, sequence=None, sequence_list=None, **kw):
""" """
Check if multiple Person Configuration Item of the Business Check if multiple Person Configuration Item of the Business
Configuration have been created successfully. Configuration have been created successfully.
""" """
...@@ -1146,7 +1140,7 @@ class TestStandardConfiguratorWorkflow(TestLiveConfiguratorWorkflowMixin): ...@@ -1146,7 +1140,7 @@ class TestStandardConfiguratorWorkflow(TestLiveConfiguratorWorkflowMixin):
'purchase', 'sales'] 'purchase', 'sales']
for account_id in account_id_list: for account_id in account_id_list:
account = self.portal.account_module._getOb(account_id) account = self.portal.account_module._getOb(account_id)
self.assertNotEquals(account, None, self.assertNotEquals(account, None,
"%s account is not Found." % account_id) "%s account is not Found." % account_id)
def stepCheckValidPersonList(self, sequence=None, sequence_list=None, **kw): def stepCheckValidPersonList(self, sequence=None, sequence_list=None, **kw):
...@@ -1200,11 +1194,11 @@ class TestStandardConfiguratorWorkflow(TestLiveConfiguratorWorkflowMixin): ...@@ -1200,11 +1194,11 @@ class TestStandardConfiguratorWorkflow(TestLiveConfiguratorWorkflowMixin):
business_configuration = sequence.get("business_configuration") business_configuration = sequence.get("business_configuration")
gadget_list = self.getBusinessConfigurationObjectList(business_configuration, 'Gadget') gadget_list = self.getBusinessConfigurationObjectList(business_configuration, 'Gadget')
for gadget in gadget_list: for gadget in gadget_list:
self.assertEquals('public', gadget.getValidationState(), self.assertEquals('public', gadget.getValidationState(),
"%s is not public but %s" % (gadget.getRelativeUrl(), "%s is not public but %s" % (gadget.getRelativeUrl(),
gadget.getValidationState())) gadget.getValidationState()))
gadget.Base_checkConsistency() gadget.Base_checkConsistency()
def stepCheckPreferenceList(self, sequence=None, sequence_list=None, **kw): def stepCheckPreferenceList(self, sequence=None, sequence_list=None, **kw):
""" """
Assert all the Peference properties. Assert all the Peference properties.
...@@ -1216,7 +1210,7 @@ class TestStandardConfiguratorWorkflow(TestLiveConfiguratorWorkflowMixin): ...@@ -1216,7 +1210,7 @@ class TestStandardConfiguratorWorkflow(TestLiveConfiguratorWorkflowMixin):
self.assertEquals(len(preference_list), 2) self.assertEquals(len(preference_list), 2)
for preference in preference_list: for preference in preference_list:
self.assertEquals(preference_tool[preference].getPreferenceState(), self.assertEquals(preference_tool[preference].getPreferenceState(),
'global') 'global')
organisation_list = self.getBusinessConfigurationObjectList(business_configuration, organisation_list = self.getBusinessConfigurationObjectList(business_configuration,
...@@ -1231,15 +1225,15 @@ class TestStandardConfiguratorWorkflow(TestLiveConfiguratorWorkflowMixin): ...@@ -1231,15 +1225,15 @@ class TestStandardConfiguratorWorkflow(TestLiveConfiguratorWorkflowMixin):
self.assertEquals(10, preference_tool.getPreferredMoneyQuantityFieldWidth()) self.assertEquals(10, preference_tool.getPreferredMoneyQuantityFieldWidth())
self.assertTrue(preference_tool.getPreferredHtmlStyleAccessTab()) self.assertTrue(preference_tool.getPreferredHtmlStyleAccessTab())
# on Business Configuration # on Business Configuration
self.assertEquals('localhost', preference_tool.getPreferredOoodocServerAddress()) #self.assertEquals('localhost', preference_tool.getPreferredOoodocServerAddress())
self.assertEquals(8011, preference_tool.getPreferredOoodocServerPortNumber()) #self.assertEquals(8011, preference_tool.getPreferredOoodocServerPortNumber())
# accounting # accounting
self.assertEquals('currency_module/EUR', self.assertEquals('currency_module/EUR',
preference_tool.getPreferredAccountingTransactionCurrency()) preference_tool.getPreferredAccountingTransactionCurrency())
self.assertEquals('gap/fr/pcg', self.assertEquals('gap/fr/pcg',
preference_tool.getPreferredAccountingTransactionGap()) preference_tool.getPreferredAccountingTransactionGap())
self.assertEquals('group/my_group', self.assertEquals('group/my_group',
preference_tool.getPreferredAccountingTransactionSectionCategory()) preference_tool.getPreferredAccountingTransactionSectionCategory())
self.assertEquals('organisation_module/%s' % organisation_id, self.assertEquals('organisation_module/%s' % organisation_id,
preference_tool.getPreferredAccountingTransactionSourceSection()) preference_tool.getPreferredAccountingTransactionSourceSection())
...@@ -1382,7 +1376,7 @@ class TestStandardConfiguratorWorkflow(TestLiveConfiguratorWorkflowMixin): ...@@ -1382,7 +1376,7 @@ class TestStandardConfiguratorWorkflow(TestLiveConfiguratorWorkflowMixin):
business_configuration = sequence.get('business_configuration') business_configuration = sequence.get('business_configuration')
organisation_list = self.getBusinessConfigurationObjectList(business_configuration, 'Organisation') organisation_list = self.getBusinessConfigurationObjectList(business_configuration, 'Organisation')
self.assertNotEquals(len(organisation_list), 0) self.assertNotEquals(len(organisation_list), 0)
organisation = organisation_list[0] organisation = organisation_list[0]
period_list = organisation.contentValues(portal_type='Accounting Period') period_list = organisation.contentValues(portal_type='Accounting Period')
self.assertEquals(1, len(period_list)) self.assertEquals(1, len(period_list))
...@@ -1399,7 +1393,7 @@ class TestStandardConfiguratorWorkflow(TestLiveConfiguratorWorkflowMixin): ...@@ -1399,7 +1393,7 @@ class TestStandardConfiguratorWorkflow(TestLiveConfiguratorWorkflowMixin):
def stepCheckRuleValidation(self, sequence=None, sequence_list=None, **kw): def stepCheckRuleValidation(self, sequence=None, sequence_list=None, **kw):
""" """
Check if rule are validated Check if rule are validated
""" """
business_configuration = sequence.get('business_configuration') business_configuration = sequence.get('business_configuration')
rule_dict = self.portal.ERPSite_getConfiguratorSimulationRuleDict() rule_dict = self.portal.ERPSite_getConfiguratorSimulationRuleDict()
...@@ -2539,17 +2533,17 @@ class TestStandardConfiguratorWorkflow(TestLiveConfiguratorWorkflowMixin): ...@@ -2539,17 +2533,17 @@ class TestStandardConfiguratorWorkflow(TestLiveConfiguratorWorkflowMixin):
portal_type='Accounting Transaction', portal_type='Accounting Transaction',
start_date=DateTime(2010, 06, 01), start_date=DateTime(2010, 06, 01),
stop_date=DateTime(2010, 06, 01)) stop_date=DateTime(2010, 06, 01))
accounting_transaction_b = self.portal.accounting_module.newContent( accounting_transaction_b = self.portal.accounting_module.newContent(
portal_type='Accounting Transaction', portal_type='Accounting Transaction',
start_date=DateTime(2010, 06, 01), start_date=DateTime(2010, 06, 01),
stop_date=DateTime(2010, 06, 01)) stop_date=DateTime(2010, 06, 01))
accounting_transaction_c = self.portal.accounting_module.newContent( accounting_transaction_c = self.portal.accounting_module.newContent(
portal_type='Accounting Transaction', portal_type='Accounting Transaction',
start_date=DateTime(2010, 06, 01), start_date=DateTime(2010, 06, 01),
stop_date=DateTime(2010, 06, 01)) stop_date=DateTime(2010, 06, 01))
accounting_transaction_x_related_to_a.setCausalityValue(\ accounting_transaction_x_related_to_a.setCausalityValue(\
accounting_transaction_a) accounting_transaction_a)
...@@ -2560,12 +2554,12 @@ class TestStandardConfiguratorWorkflow(TestLiveConfiguratorWorkflowMixin): ...@@ -2560,12 +2554,12 @@ class TestStandardConfiguratorWorkflow(TestLiveConfiguratorWorkflowMixin):
accounting_transaction_a.setCausalityValueList([accounting_transaction_b, accounting_transaction_a.setCausalityValueList([accounting_transaction_b,
accounting_transaction_c]) accounting_transaction_c])
self.stepTic() self.stepTic()
accounting_transaction_list = accounting_transaction_a.\ accounting_transaction_list = accounting_transaction_a.\
AccountingTransaction_getCausalityGroupedAccountingTransactionList() AccountingTransaction_getCausalityGroupedAccountingTransactionList()
self.assertEquals(5, len(accounting_transaction_list)) self.assertEquals(5, len(accounting_transaction_list))
self.assertTrue(accounting_transaction_a in accounting_transaction_list) self.assertTrue(accounting_transaction_a in accounting_transaction_list)
self.assertTrue(accounting_transaction_b in accounting_transaction_list) self.assertTrue(accounting_transaction_b in accounting_transaction_list)
self.assertTrue(accounting_transaction_c in accounting_transaction_list) self.assertTrue(accounting_transaction_c in accounting_transaction_list)
...@@ -2573,16 +2567,16 @@ class TestStandardConfiguratorWorkflow(TestLiveConfiguratorWorkflowMixin): ...@@ -2573,16 +2567,16 @@ class TestStandardConfiguratorWorkflow(TestLiveConfiguratorWorkflowMixin):
accounting_transaction_list) accounting_transaction_list)
self.assertTrue(accounting_transaction_y_related_to_a in \ self.assertTrue(accounting_transaction_y_related_to_a in \
accounting_transaction_list) accounting_transaction_list)
accounting_transaction_x_related_to_a.delete() accounting_transaction_x_related_to_a.delete()
accounting_transaction_y_related_to_a.cancel() accounting_transaction_y_related_to_a.cancel()
self.stepTic() self.stepTic()
accounting_transaction_list = accounting_transaction_a.\ accounting_transaction_list = accounting_transaction_a.\
AccountingTransaction_getCausalityGroupedAccountingTransactionList() AccountingTransaction_getCausalityGroupedAccountingTransactionList()
self.assertEquals(3, len(accounting_transaction_list)) self.assertEquals(3, len(accounting_transaction_list))
self.assertFalse(accounting_transaction_x_related_to_a in \ self.assertFalse(accounting_transaction_x_related_to_a in \
accounting_transaction_list) accounting_transaction_list)
self.assertFalse(accounting_transaction_y_related_to_a in \ self.assertFalse(accounting_transaction_y_related_to_a in \
...@@ -2980,7 +2974,7 @@ class TestStandardConfiguratorWorkflow(TestLiveConfiguratorWorkflowMixin): ...@@ -2980,7 +2974,7 @@ class TestStandardConfiguratorWorkflow(TestLiveConfiguratorWorkflowMixin):
""" """
sequence_list.addSequenceString(sequence_string) sequence_list.addSequenceString(sequence_string)
sequence_list.play(self) sequence_list.play(self)
# def exportConfiguratorBusinessTemplate(self): # def exportConfiguratorBusinessTemplate(self):
# """ """ # """ """
# # we save this configuration business template for another test # # we save this configuration business template for another test
......
erp5_simulation erp5_configurator
erp5_accounting \ No newline at end of file
erp5_configurator
erp5_workflow
\ No newline at end of file
573 574
\ No newline at end of file \ No newline at end of file
account_type
configurator_function
configurator_region
financial_section
gap
\ No newline at end of file
business_configuration_module/default_standard_configuration business_configuration_module/default_standard_configuration
portal_categories/configurator_function
portal_categories/configurator_function/** portal_categories/configurator_function/**
portal_categories/configurator_region
portal_categories/configurator_region/** portal_categories/configurator_region/**
workflow_module/erp5_consulting_workflow workflow_module/erp5_consulting_workflow
workflow_module/erp5_consulting_workflow/** workflow_module/erp5_consulting_workflow/**
......
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