Commit 5d264533 by Julien Muchembled

Fix testArchive & testERP5Catalog on Zope 2.13

1 parent 70b4842c
......@@ -167,29 +167,27 @@ class TestArchive(InventoryAPITestCase):
self.checkRelativeUrlInSQLPathList(path_list, connection_id=self.original_connection_id)
# Create new connectors for destination
addSQLConnection = portal.manage_addProduct['ZMySQLDA'] \
.manage_addZMySQLConnection
self.new_connection_id = 'erp5_sql_connection1'
db1, db2 = getExtraSqlConnectionStringList()[:2]
portal.manage_addZMySQLConnection(self.new_connection_id,'',
db1)
addSQLConnection(self.new_connection_id,'', db1)
new_connection = portal[self.new_connection_id]
new_connection.manage_open_connection()
# the deferred one
self.new_deferred_connection_id = 'erp5_sql_connection2'
portal.manage_addZMySQLConnection(self.new_deferred_connection_id,'',
db1)
addSQLConnection(self.new_deferred_connection_id,'', db1)
new_deferred_connection = portal[self.new_deferred_connection_id]
new_deferred_connection.manage_open_connection()
# Create new connectors for archive
self.archive_connection_id = 'erp5_sql_connection3'
portal.manage_addZMySQLConnection(self.archive_connection_id,'',
db2)
addSQLConnection(self.archive_connection_id,'', db2)
archive_connection = portal[self.archive_connection_id]
archive_connection.manage_open_connection()
# the deferred one
self.archive_deferred_connection_id = 'erp5_sql_connection4'
portal.manage_addZMySQLConnection(self.archive_deferred_connection_id,'',
db2)
addSQLConnection(self.archive_deferred_connection_id,'', db2)
archive_deferred_connection = portal[self.archive_deferred_connection_id]
archive_deferred_connection.manage_open_connection()
......
......@@ -1495,13 +1495,13 @@ class TestERP5Catalog(ERP5TypeTestCase, LogInterceptor):
title="GreatTitle2")
# Flush message queue
self.tic()
addSQLConnection = portal.manage_addProduct['ZMySQLDA'] \
.manage_addZMySQLConnection
# Create new connectors
portal.manage_addZMySQLConnection(self.new_connection_id,'',
new_connection_string)
addSQLConnection(self.new_connection_id,'', new_connection_string)
new_connection = portal[self.new_connection_id]
new_connection.manage_open_connection()
portal.manage_addZMySQLConnection(self.new_deferred_connection_id,'',
new_connection_string)
addSQLConnection(self.new_deferred_connection_id,'', new_connection_string)
new_connection = portal[self.new_deferred_connection_id]
new_connection.manage_open_connection()
# the transactionless connector must not be change because this one
......@@ -1648,11 +1648,12 @@ class TestERP5Catalog(ERP5TypeTestCase, LogInterceptor):
LOG('Testing... ',0, message)
# Create new connectors
portal.manage_addZMySQLConnection(self.new_erp5_sql_connection,'',
new_connection_string)
addSQLConnection = portal.manage_addProduct['ZMySQLDA'] \
.manage_addZMySQLConnection
addSQLConnection(self.new_erp5_sql_connection,'', new_connection_string)
new_connection = portal[self.new_erp5_sql_connection]
new_connection.manage_open_connection()
portal.manage_addZMySQLConnection(self.new_erp5_deferred_sql_connection,'',
addSQLConnection(self.new_erp5_deferred_sql_connection,'',
new_connection_string)
new_connection = portal[self.new_erp5_deferred_sql_connection]
new_connection.manage_open_connection()
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!