Commit 0b0d2ace authored by Ayush Tiwari's avatar Ayush Tiwari Committed by Vincent Pelletier

ERP5Catalog: Follow style guildelines in tests

parent e2dc29ce
...@@ -583,13 +583,13 @@ class TestERP5Catalog(ERP5TypeTestCase, LogInterceptor): ...@@ -583,13 +583,13 @@ class TestERP5Catalog(ERP5TypeTestCase, LogInterceptor):
portal_skins_custom = portal.portal_skins.custom portal_skins_custom = portal.portal_skins.custom
portal_skins_custom.manage_addProduct['ZSQLMethods'].manage_addZSQLMethod( portal_skins_custom.manage_addProduct['ZSQLMethods'].manage_addZSQLMethod(
id = 'testMethod', id='testMethod',
title = '', title='',
connection_id = 'erp5_sql_connection', connection_id='erp5_sql_connection',
arguments = "\n".join([ 'from_table_list', arguments="\n".join([ 'from_table_list',
'where_expression', 'where_expression',
'order_by_expression' ]), 'order_by_expression' ]),
template = sql_squeleton) template=sql_squeleton)
testMethod = portal_skins_custom['testMethod'] testMethod = portal_skins_custom['testMethod']
default_parametrs = {} default_parametrs = {}
...@@ -2401,21 +2401,21 @@ CREATE TABLE `%s` ( ...@@ -2401,21 +2401,21 @@ CREATE TABLE `%s` (
) ENGINE=InnoDB; ) ENGINE=InnoDB;
""" % local_roles_table """ % local_roles_table
sql_catalog.manage_addProduct['ZSQLMethods'].manage_addZSQLMethod( sql_catalog.manage_addProduct['ZSQLMethods'].manage_addZSQLMethod(
id = 'z_create_%s' % local_roles_table, id='z_create_%s' % local_roles_table,
title = '', title='',
arguments = "", arguments="",
connection_id = 'erp5_sql_connection', connection_id='erp5_sql_connection',
template = create_local_role_table_sql) template=create_local_role_table_sql)
drop_local_role_table_sql = """ drop_local_role_table_sql = """
DROP TABLE IF EXISTS %s DROP TABLE IF EXISTS %s
""" % local_roles_table """ % local_roles_table
sql_catalog.manage_addProduct['ZSQLMethods'].manage_addZSQLMethod( sql_catalog.manage_addProduct['ZSQLMethods'].manage_addZSQLMethod(
id = 'z0_drop_%s' % local_roles_table, id='z0_drop_%s' % local_roles_table,
title = '', title='',
arguments = "", arguments="",
connection_id = 'erp5_sql_connection', connection_id='erp5_sql_connection',
template = drop_local_role_table_sql) template=drop_local_role_table_sql)
catalog_local_role_sql = """ catalog_local_role_sql = """
REPLACE INTO REPLACE INTO
...@@ -2433,12 +2433,12 @@ VALUES ...@@ -2433,12 +2433,12 @@ VALUES
</dtml-in> </dtml-in>
""" % local_roles_table """ % local_roles_table
sql_catalog.manage_addProduct['ZSQLMethods'].manage_addZSQLMethod( sql_catalog.manage_addProduct['ZSQLMethods'].manage_addZSQLMethod(
id = 'z_catalog_%s_list' % local_roles_table, id='z_catalog_%s_list' % local_roles_table,
title = '', title='',
connection_id = 'erp5_sql_connection', connection_id='erp5_sql_connection',
arguments = "\n".join(['uid', arguments="\n".join(['uid',
'Base_getOwnerId']), 'Base_getOwnerId']),
template = catalog_local_role_sql) template=catalog_local_role_sql)
self.commit() self.commit()
current_sql_catalog_object_list = sql_catalog.sql_catalog_object_list current_sql_catalog_object_list = sql_catalog.sql_catalog_object_list
...@@ -2585,21 +2585,21 @@ CREATE TABLE `%s` ( ...@@ -2585,21 +2585,21 @@ CREATE TABLE `%s` (
) ENGINE=InnoDB; ) ENGINE=InnoDB;
""" % local_roles_table """ % local_roles_table
sql_catalog.manage_addProduct['ZSQLMethods'].manage_addZSQLMethod( sql_catalog.manage_addProduct['ZSQLMethods'].manage_addZSQLMethod(
id = 'z_create_%s' % local_roles_table, id='z_create_%s' % local_roles_table,
title = '', title='',
arguments = "", arguments="",
connection_id = 'erp5_sql_connection', connection_id='erp5_sql_connection',
template = create_local_role_table_sql) template=create_local_role_table_sql)
drop_local_role_table_sql = """ drop_local_role_table_sql = """
DROP TABLE IF EXISTS %s DROP TABLE IF EXISTS %s
""" % local_roles_table """ % local_roles_table
sql_catalog.manage_addProduct['ZSQLMethods'].manage_addZSQLMethod( sql_catalog.manage_addProduct['ZSQLMethods'].manage_addZSQLMethod(
id = 'z0_drop_%s' % local_roles_table, id='z0_drop_%s' % local_roles_table,
title = '', title='',
arguments = "", arguments="",
connection_id = 'erp5_sql_connection', connection_id='erp5_sql_connection',
template = drop_local_role_table_sql) template=drop_local_role_table_sql)
catalog_local_role_sql = """ catalog_local_role_sql = """
REPLACE INTO REPLACE INTO
...@@ -2618,13 +2618,13 @@ VALUES ...@@ -2618,13 +2618,13 @@ VALUES
</dtml-in> </dtml-in>
""" % local_roles_table """ % local_roles_table
sql_catalog.manage_addProduct['ZSQLMethods'].manage_addZSQLMethod( sql_catalog.manage_addProduct['ZSQLMethods'].manage_addZSQLMethod(
id = 'z_catalog_%s_list' % local_roles_table, id='z_catalog_%s_list' % local_roles_table,
title = '', title='',
connection_id = 'erp5_sql_connection', connection_id='erp5_sql_connection',
arguments = "\n".join(['uid', arguments="\n".join(['uid',
'getAssignee', 'getAssignee',
'getViewPermissionAssignee']), 'getViewPermissionAssignee']),
template = catalog_local_role_sql) template=catalog_local_role_sql)
self.commit() self.commit()
current_sql_catalog_object_list = sql_catalog.sql_catalog_object_list current_sql_catalog_object_list = sql_catalog.sql_catalog_object_list
...@@ -2743,21 +2743,21 @@ CREATE TABLE `%s` ( ...@@ -2743,21 +2743,21 @@ CREATE TABLE `%s` (
) ENGINE=InnoDB; ) ENGINE=InnoDB;
""" % local_roles_table """ % local_roles_table
sql_catalog.manage_addProduct['ZSQLMethods'].manage_addZSQLMethod( sql_catalog.manage_addProduct['ZSQLMethods'].manage_addZSQLMethod(
id = 'z_create_%s' % local_roles_table, id='z_create_%s' % local_roles_table,
title = '', title='',
arguments = "", arguments="",
connection_id = 'erp5_sql_connection', connection_id='erp5_sql_connection',
template = create_local_role_table_sql) template=create_local_role_table_sql)
drop_local_role_table_sql = """ drop_local_role_table_sql = """
DROP TABLE IF EXISTS %s DROP TABLE IF EXISTS %s
""" % local_roles_table """ % local_roles_table
sql_catalog.manage_addProduct['ZSQLMethods'].manage_addZSQLMethod( sql_catalog.manage_addProduct['ZSQLMethods'].manage_addZSQLMethod(
id = 'z0_drop_%s' % local_roles_table, id='z0_drop_%s' % local_roles_table,
title = '', title='',
arguments = "", arguments="",
connection_id = 'erp5_sql_connection', connection_id='erp5_sql_connection',
template = drop_local_role_table_sql) template=drop_local_role_table_sql)
catalog_local_role_sql = """ catalog_local_role_sql = """
REPLACE INTO REPLACE INTO
...@@ -2776,13 +2776,13 @@ VALUES ...@@ -2776,13 +2776,13 @@ VALUES
</dtml-in> </dtml-in>
""" % local_roles_table """ % local_roles_table
sql_catalog.manage_addProduct['ZSQLMethods'].manage_addZSQLMethod( sql_catalog.manage_addProduct['ZSQLMethods'].manage_addZSQLMethod(
id = 'z_catalog_%s_list' % local_roles_table, id='z_catalog_%s_list' % local_roles_table,
title = '', title='',
connection_id = 'erp5_sql_connection', connection_id='erp5_sql_connection',
arguments = "\n".join(['uid', arguments="\n".join(['uid',
'getAssignee', 'getAssignee',
'getViewPermissionAssignee']), 'getViewPermissionAssignee']),
template = catalog_local_role_sql) template=catalog_local_role_sql)
self.commit() self.commit()
current_sql_catalog_object_list = sql_catalog.sql_catalog_object_list current_sql_catalog_object_list = sql_catalog.sql_catalog_object_list
...@@ -2995,21 +2995,21 @@ CREATE TABLE `%s` ( ...@@ -2995,21 +2995,21 @@ CREATE TABLE `%s` (
) ENGINE=InnoDB; ) ENGINE=InnoDB;
""" % local_roles_table """ % local_roles_table
sql_catalog.manage_addProduct['ZSQLMethods'].manage_addZSQLMethod( sql_catalog.manage_addProduct['ZSQLMethods'].manage_addZSQLMethod(
id = 'z_create_%s' % local_roles_table, id='z_create_%s' % local_roles_table,
title = '', title='',
arguments = "", arguments="",
connection_id = 'erp5_sql_connection', connection_id='erp5_sql_connection',
template = create_local_role_table_sql) template=create_local_role_table_sql)
drop_local_role_table_sql = """ drop_local_role_table_sql = """
DROP TABLE IF EXISTS %s DROP TABLE IF EXISTS %s
""" % local_roles_table """ % local_roles_table
sql_catalog.manage_addProduct['ZSQLMethods'].manage_addZSQLMethod( sql_catalog.manage_addProduct['ZSQLMethods'].manage_addZSQLMethod(
id = 'z0_drop_%s' % local_roles_table, id='z0_drop_%s' % local_roles_table,
title = '', title='',
arguments = "", arguments="",
connection_id = 'erp5_sql_connection', connection_id='erp5_sql_connection',
template = drop_local_role_table_sql) template=drop_local_role_table_sql)
catalog_local_role_sql = """ catalog_local_role_sql = """
REPLACE INTO REPLACE INTO
...@@ -3027,12 +3027,12 @@ VALUES ...@@ -3027,12 +3027,12 @@ VALUES
</dtml-in> </dtml-in>
""" % local_roles_table """ % local_roles_table
sql_catalog.manage_addProduct['ZSQLMethods'].manage_addZSQLMethod( sql_catalog.manage_addProduct['ZSQLMethods'].manage_addZSQLMethod(
id = 'z_catalog_%s_list' % local_roles_table, id='z_catalog_%s_list' % local_roles_table,
title = '', title='',
connection_id = 'erp5_sql_connection', connection_id='erp5_sql_connection',
arguments = "\n".join(['uid', arguments="\n".join(['uid',
'getViewPermissionAssignee']), 'getViewPermissionAssignee']),
template = catalog_local_role_sql) template=catalog_local_role_sql)
self.commit() self.commit()
current_sql_catalog_object_list = sql_catalog.sql_catalog_object_list current_sql_catalog_object_list = sql_catalog.sql_catalog_object_list
...@@ -3224,21 +3224,21 @@ CREATE TABLE `%s` ( ...@@ -3224,21 +3224,21 @@ CREATE TABLE `%s` (
) ENGINE=InnoDB; ) ENGINE=InnoDB;
""" % local_roles_table """ % local_roles_table
sql_catalog.manage_addProduct['ZSQLMethods'].manage_addZSQLMethod( sql_catalog.manage_addProduct['ZSQLMethods'].manage_addZSQLMethod(
id = 'z_create_%s' % local_roles_table, id='z_create_%s' % local_roles_table,
title = '', title='',
arguments = "", arguments="",
connection_id = 'erp5_sql_connection', connection_id='erp5_sql_connection',
template = create_local_role_table_sql) template=create_local_role_table_sql)
drop_local_role_table_sql = """ drop_local_role_table_sql = """
DROP TABLE IF EXISTS %s DROP TABLE IF EXISTS %s
""" % local_roles_table """ % local_roles_table
sql_catalog.manage_addProduct['ZSQLMethods'].manage_addZSQLMethod( sql_catalog.manage_addProduct['ZSQLMethods'].manage_addZSQLMethod(
id = 'z0_drop_%s' % local_roles_table, id='z0_drop_%s' % local_roles_table,
title = '', title='',
arguments = "", arguments="",
connection_id = 'erp5_sql_connection', connection_id='erp5_sql_connection',
template = drop_local_role_table_sql) template=drop_local_role_table_sql)
catalog_local_role_sql = """ catalog_local_role_sql = """
REPLACE INTO REPLACE INTO
...@@ -3256,12 +3256,12 @@ VALUES ...@@ -3256,12 +3256,12 @@ VALUES
</dtml-in> </dtml-in>
""" % local_roles_table """ % local_roles_table
sql_catalog.manage_addProduct['ZSQLMethods'].manage_addZSQLMethod( sql_catalog.manage_addProduct['ZSQLMethods'].manage_addZSQLMethod(
id = 'z_catalog_%s_list' % local_roles_table, id='z_catalog_%s_list' % local_roles_table,
title = '', title='',
connection_id = 'erp5_sql_connection', connection_id='erp5_sql_connection',
arguments = "\n".join(['uid', arguments="\n".join(['uid',
'getViewPermissionAssignee']), 'getViewPermissionAssignee']),
template = catalog_local_role_sql) template=catalog_local_role_sql)
self.commit() self.commit()
current_sql_catalog_object_list = sql_catalog.sql_catalog_object_list current_sql_catalog_object_list = sql_catalog.sql_catalog_object_list
......
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