From ca11d30ea9432c0bd70c979335cdbf73ca5986dd Mon Sep 17 00:00:00 2001 From: Ayush Tiwari <ayush.tiwari@nexedi.com> Date: Tue, 16 Aug 2016 12:25:29 +0000 Subject: [PATCH] erp5_catalog: Create ERP5 SQL Method everywhere in Archive tool and testArchive --- product/ERP5Catalog/tests/testArchive.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/product/ERP5Catalog/tests/testArchive.py b/product/ERP5Catalog/tests/testArchive.py index f69aab1952..08f681286b 100644 --- a/product/ERP5Catalog/tests/testArchive.py +++ b/product/ERP5Catalog/tests/testArchive.py @@ -88,14 +88,13 @@ class TestArchive(InventoryAPITestCase): portal_skins_custom = portal.portal_skins.custom zsql_method = getattr(portal_skins_custom, zsql_method_id, None) if zsql_method is None: - portal_skins_custom.manage_addProduct['ZSQLMethods']\ - .manage_addZSQLMethod( + zsql_method = portal_skins_custom.newContent( \ + portal_type = 'SQL Method', id = zsql_method_id, title = '', connection_id = connection_id, arguments = "", - template = "select path from catalog") - zsql_method = portal_skins_custom[zsql_method_id] + src = "select path from catalog") zsql_method.max_rows_ = 0 # it is mandatory to provide connection_id, or the # zsql method will look at preference and use the one -- 2.30.9