diff --git a/product/ERP5Catalog/tests/testArchive.py b/bt5/erp5_archive/TestTemplateItem/portal_components/test.erp5.testArchive.py similarity index 98% rename from product/ERP5Catalog/tests/testArchive.py rename to bt5/erp5_archive/TestTemplateItem/portal_components/test.erp5.testArchive.py index f69aab1952c7d89d976d2ae415583e81f82238c0..6bfd311bc41fc26fa73ed3158237658101011c08 100644 --- a/product/ERP5Catalog/tests/testArchive.py +++ b/bt5/erp5_archive/TestTemplateItem/portal_components/test.erp5.testArchive.py @@ -73,7 +73,7 @@ class TestArchive(InventoryAPITestCase): self.getPortal().portal_activities.manageClearActivities() self.tic() - def login(self): + def login(self, *args, **kw): uf = self.getPortal().acl_users uf._doAddUser('seb', '', ['Manager'], []) user = uf.getUserById('seb').__of__(uf) @@ -101,7 +101,7 @@ class TestArchive(InventoryAPITestCase): # zsql method will look at preference and use the one # defined by the archive result = zsql_method(connection_id=connection_id) - path_list = map(lambda x: x['path'],result) + path_list = [x['path'] for x in result] return path_list def checkRelativeUrlInSQLPathList(self,url_list,connection_id=None): @@ -121,7 +121,7 @@ class TestArchive(InventoryAPITestCase): self.assertTrue(path not in path_list) @reindex - def _makeInventory(self, date): + def _makeInventory(self, date): # pylint: disable=arguments-differ """ Create inventory, use to check if they goes to the right catalog """ @@ -347,7 +347,8 @@ class TestArchive(InventoryAPITestCase): def test_MaximumRecursionDepthExceededWithComplexSecurity(self): skin = self.portal.portal_skins.custom colour = self.portal.portal_categories.colour - colour.hasObject('green') or colour.newContent('green') + if not colour.hasObject('green'): + colour.newContent('green') login = str(time.time()) script_id = ["ERP5Type_getSecurityCategoryMapping", "ERP5Type_getSecurityCategory"] diff --git a/bt5/erp5_archive/TestTemplateItem/portal_components/test.erp5.testArchive.xml b/bt5/erp5_archive/TestTemplateItem/portal_components/test.erp5.testArchive.xml new file mode 100644 index 0000000000000000000000000000000000000000..040fe332ef734b698d6958fbae9b640b53b2599c --- /dev/null +++ b/bt5/erp5_archive/TestTemplateItem/portal_components/test.erp5.testArchive.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>testArchive</string> </value> + </item> + <item> + <key> <string>default_source_reference</string> </key> + <value> <string>Products.ERP5Catalog.tests.testArchive</string> </value> + </item> + <item> + <key> <string>description</string> </key> + <value> + <none/> + </value> + </item> + <item> + <key> <string>id</string> </key> + <value> <string>test.erp5.testArchive</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_archive/bt/template_test_id_list b/bt5/erp5_archive/bt/template_test_id_list new file mode 100644 index 0000000000000000000000000000000000000000..c339dbf1617433404732ef80c1eb2a185e81d567 --- /dev/null +++ b/bt5/erp5_archive/bt/template_test_id_list @@ -0,0 +1 @@ +test.erp5.testArchive \ No newline at end of file diff --git a/bt5/erp5_archive/bt/test_dependency_list b/bt5/erp5_archive/bt/test_dependency_list new file mode 100644 index 0000000000000000000000000000000000000000..53948fdc0b3f09e7f97cc7b83d65a1d26ccdd169 --- /dev/null +++ b/bt5/erp5_archive/bt/test_dependency_list @@ -0,0 +1,12 @@ +erp5_full_text_mroonga_catalog +erp5_core_proxy_field_legacy +erp5_base +erp5_pdm +erp5_dummy_movement +erp5_simulation +erp5_trade +erp5_apparel +erp5_project +erp5_configurator_standard_trade_template +erp5_simulation_test +erp5_stock_cache \ No newline at end of file