diff --git a/product/ERP5/tests/testTemplateTool.py b/bt5/erp5_forge/TestTemplateItem/portal_components/test.erp5.testTemplateTool.py similarity index 99% rename from product/ERP5/tests/testTemplateTool.py rename to bt5/erp5_forge/TestTemplateItem/portal_components/test.erp5.testTemplateTool.py index c7646b39413f1ff8ae86817d1ddef5aea753bd76..9645b89f4f8254bf155d7c261f2bd4d7e57cf9e4 100644 --- a/product/ERP5/tests/testTemplateTool.py +++ b/bt5/erp5_forge/TestTemplateItem/portal_components/test.erp5.testTemplateTool.py @@ -51,7 +51,6 @@ class TestTemplateTool(ERP5TypeTestCase): return ('erp5_core_proxy_field_legacy', 'erp5_full_text_mroonga_catalog', 'erp5_base', - 'erp5_stock_cache', 'erp5_csv_style', 'erp5_crm', 'erp5_forge') @@ -353,7 +352,7 @@ class TestTemplateTool(ERP5TypeTestCase): try: bt.export(root, local=1) with open(os.path.join(root, 'bt', 'title')) as f: - self.assertTrue('test_core', f.read()) + self.assertEqual('test_core', f.read()) # We don't export revision anymore. self.assertFalse(os.path.exists(os.path.join(root, 'bt', 'revision'))) # Computed at download ... @@ -424,7 +423,7 @@ class TestTemplateTool(ERP5TypeTestCase): 'http://www.erp5.org/dists/snapshot/bt5/erp5_base.bt5') self.assertEqual(getBusinessTemplateUrl(url_list[2:], exist_bt5), 'http://www.erp5.org/dists/release/5.4.5/bt5/erp5_base.bt5') - INSTANCE_HOME = getConfiguration().instancehome + INSTANCE_HOME = getConfiguration().instancehome # pylint: disable=redefined-builtin local_bt = None if os.path.exists(INSTANCE_HOME + "/bt5/erp5_base"): local_bt = 'file://' + INSTANCE_HOME + "/bt5/erp5_base" @@ -799,11 +798,11 @@ class TestTemplateTool(ERP5TypeTestCase): copyTestCoreBt("bt5") # create bt1..5 BT inside dummy_repository repo_xml = getDOMImplementation().createDocument(None, "repository", None) - createBtAndAddToRepository(repository, repo_xml, title='bt1', dependency_list=('bt4',)), - createBtAndAddToRepository(repository, repo_xml, title='bt2'), - createBtAndAddToRepository(repository, repo_xml, title='bt3'), - createBtAndAddToRepository(repository, repo_xml, title='bt4'), - createBtAndAddToRepository(repository, repo_xml, title='bt5'), + createBtAndAddToRepository(repository, repo_xml, title='bt1', dependency_list=('bt4',)) + createBtAndAddToRepository(repository, repo_xml, title='bt2') + createBtAndAddToRepository(repository, repo_xml, title='bt3') + createBtAndAddToRepository(repository, repo_xml, title='bt4') + createBtAndAddToRepository(repository, repo_xml, title='bt5') with open("%s/bt5list" % repository,"wb") as repo_xml_fd: repo_xml.writexml(repo_xml_fd) repo_xml_fd.close() diff --git a/bt5/erp5_forge/TestTemplateItem/portal_components/test.erp5.testTemplateTool.xml b/bt5/erp5_forge/TestTemplateItem/portal_components/test.erp5.testTemplateTool.xml new file mode 100644 index 0000000000000000000000000000000000000000..251f4a73b20afa7219d4cc5edd53391d9a91c61e --- /dev/null +++ b/bt5/erp5_forge/TestTemplateItem/portal_components/test.erp5.testTemplateTool.xml @@ -0,0 +1,110 @@ +<?xml version="1.0"?> +<ZopeData> + <record id="1" aka="AAAAAAAAAAE="> + <pickle> + <global name="Test Component" module="erp5.portal_type"/> + </pickle> + <pickle> + <dictionary> + <item> + <key> <string>default_reference</string> </key> + <value> <string>testTemplateTool</string> </value> + </item> + <item> + <key> <string>default_source_reference</string> </key> + <value> <string>Products.ERP5.tests.testTemplateTool</string> </value> + </item> + <item> + <key> <string>description</string> </key> + <value> + <none/> + </value> + </item> + <item> + <key> <string>id</string> </key> + <value> <string>test.erp5.testTemplateTool</string> </value> + </item> + <item> + <key> <string>portal_type</string> </key> + <value> <string>Test Component</string> </value> + </item> + <item> + <key> <string>sid</string> </key> + <value> + <none/> + </value> + </item> + <item> + <key> <string>text_content_error_message</string> </key> + <value> + <tuple/> + </value> + </item> + <item> + <key> <string>text_content_warning_message</string> </key> + <value> + <tuple/> + </value> + </item> + <item> + <key> <string>version</string> </key> + <value> <string>erp5</string> </value> + </item> + <item> + <key> <string>workflow_history</string> </key> + <value> + <persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent> + </value> + </item> + </dictionary> + </pickle> + </record> + <record id="2" aka="AAAAAAAAAAI="> + <pickle> + <global name="PersistentMapping" module="Persistence.mapping"/> + </pickle> + <pickle> + <dictionary> + <item> + <key> <string>data</string> </key> + <value> + <dictionary> + <item> + <key> <string>component_validation_workflow</string> </key> + <value> + <persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent> + </value> + </item> + </dictionary> + </value> + </item> + </dictionary> + </pickle> + </record> + <record id="3" aka="AAAAAAAAAAM="> + <pickle> + <global name="WorkflowHistoryList" module="Products.ERP5Type.Workflow"/> + </pickle> + <pickle> + <dictionary> + <item> + <key> <string>_log</string> </key> + <value> + <list> + <dictionary> + <item> + <key> <string>action</string> </key> + <value> <string>validate</string> </value> + </item> + <item> + <key> <string>validation_state</string> </key> + <value> <string>validated</string> </value> + </item> + </dictionary> + </list> + </value> + </item> + </dictionary> + </pickle> + </record> +</ZopeData> diff --git a/bt5/erp5_forge/bt/template_test_id_list b/bt5/erp5_forge/bt/template_test_id_list index 93cd79aada97d1bc88b4925a191db20cd755f95e..00e1d25e1bb8a72db525fae943911cabec8d915c 100644 --- a/bt5/erp5_forge/bt/template_test_id_list +++ b/bt5/erp5_forge/bt/template_test_id_list @@ -1,2 +1,3 @@ test.erp5.testBug -test.erp5.testERP5Toolbox \ No newline at end of file +test.erp5.testERP5Toolbox +test.erp5.testTemplateTool \ No newline at end of file diff --git a/bt5/erp5_forge/bt/test_dependency_list b/bt5/erp5_forge/bt/test_dependency_list index 67e54c86c047e215c19d1e3c9a3e082d03f47104..446d39c7cfddf7ca8b0a7997859fda19bd9c5e6a 100644 --- a/bt5/erp5_forge/bt/test_dependency_list +++ b/bt5/erp5_forge/bt/test_dependency_list @@ -3,4 +3,6 @@ erp5_full_text_mroonga_catalog erp5_pdm erp5_simulation erp5_trade -erp5_project \ No newline at end of file +erp5_project +erp5_core_proxy_field_legacy +erp5_csv_style \ No newline at end of file