Commit 973f12b3 authored by Ayush Tiwari's avatar Ayush Tiwari

erp5_catalog: Update tests according to the changes in ERP5Catalog

Also, add test for migration in testERP5Catalog(as the first test to be run)
and migrate Catalog in afterSetup in testERP5CatalogSecurityUidOptimization.
parent 8a9f1ab8
......@@ -73,12 +73,12 @@ CREATE TABLE alternate_roles_and_users (
'alternate_roles_and_users']
# Configure sql method to insert this table
sql_catalog.manage_addProduct['ZSQLMethods'].manage_addZSQLMethod(
sql_catalog.newContent(portal_type='SQL Method',
id='z_catalog_alternate_roles_and_users_list',
title='',
connection_id='erp5_sql_connection',
arguments="\n".join(['uid', 'alternate_security_uid']),
template="""REPLACE INTO alternate_roles_and_users VALUES
arguments_src="\n".join(['uid', 'alternate_security_uid']),
src="""REPLACE INTO alternate_roles_and_users VALUES
<dtml-in prefix="loop" expr="_.range(_.len(uid))">
( <dtml-sqlvar expr="uid[loop_item]" type="int">,
<dtml-sqlvar expr="alternate_security_uid[loop_item]" type="int" optional>
......
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