diff --git a/product/ERP5Workflow/tests/testERP5Workflow.py b/bt5/erp5_workflow/TestTemplateItem/portal_components/test.erp5.testERP5Workflow.py similarity index 97% rename from product/ERP5Workflow/tests/testERP5Workflow.py rename to bt5/erp5_workflow/TestTemplateItem/portal_components/test.erp5.testERP5Workflow.py index 5ac9f37c858a5597223b4b3b1d541066769e8d47..d448680c0be54d3d20ff9dfa4608d95fe79b9a5e 100644 --- a/product/ERP5Workflow/tests/testERP5Workflow.py +++ b/bt5/erp5_workflow/TestTemplateItem/portal_components/test.erp5.testERP5Workflow.py @@ -112,9 +112,9 @@ class TestERP5Workflow(ERP5TypeTestCase): destination_value=s1) s1.setDestinationValue(t1) - v1 = workflow.newContent(portal_type='Variable', - title='actor', - initial_value='member/getIdOrUserName') + workflow.newContent(portal_type='Variable', + title='actor', + initial_value='member/getIdOrUserName') doc = self.portal.newContent(portal_type='Folder', id='test_doc') workflow.initializeDocument(doc) @@ -205,7 +205,7 @@ class TestERP5Workflow(ERP5TypeTestCase): self.changeToAnonymous() self.assertRaises(Unauthorized, workflow_module.view) self.assertRaises(Unauthorized, createWorkflowInstance) - self.assertRaises(Unauthorized, lambda: workflow_instance.view()) + self.assertRaises(Unauthorized, workflow_instance.view) def test_suite(): diff --git a/bt5/erp5_workflow/TestTemplateItem/portal_components/test.erp5.testERP5Workflow.xml b/bt5/erp5_workflow/TestTemplateItem/portal_components/test.erp5.testERP5Workflow.xml new file mode 100644 index 0000000000000000000000000000000000000000..45ceb964ac3db33fb90b1a96a6d0380baacbe8f0 --- /dev/null +++ b/bt5/erp5_workflow/TestTemplateItem/portal_components/test.erp5.testERP5Workflow.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>testERP5Workflow</string> </value> + </item> + <item> + <key> <string>default_source_reference</string> </key> + <value> <string>Products.ERP5Workflow.tests.testERP5Workflow</string> </value> + </item> + <item> + <key> <string>description</string> </key> + <value> + <none/> + </value> + </item> + <item> + <key> <string>id</string> </key> + <value> <string>test.erp5.testERP5Workflow</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_workflow/bt/template_test_id_list b/bt5/erp5_workflow/bt/template_test_id_list new file mode 100644 index 0000000000000000000000000000000000000000..e13a6bca26ae1cf8f5d5cd333e64b3bca3364339 --- /dev/null +++ b/bt5/erp5_workflow/bt/template_test_id_list @@ -0,0 +1 @@ +test.erp5.testERP5Workflow \ No newline at end of file diff --git a/bt5/erp5_workflow/bt/test_dependency_list b/bt5/erp5_workflow/bt/test_dependency_list new file mode 100644 index 0000000000000000000000000000000000000000..bff77e32d84989312efdf3b2caed2e39f9a513ed --- /dev/null +++ b/bt5/erp5_workflow/bt/test_dependency_list @@ -0,0 +1 @@ +erp5_full_text_mroonga_catalog \ No newline at end of file diff --git a/product/ERP5Workflow/tests/__init__.py b/product/ERP5Workflow/tests/__init__.py deleted file mode 100644 index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000