Commit 5d264533 authored by Julien Muchembled's avatar Julien Muchembled

Fix testArchive & testERP5Catalog on Zope 2.13

parent 70b4842c
...@@ -167,29 +167,27 @@ class TestArchive(InventoryAPITestCase): ...@@ -167,29 +167,27 @@ class TestArchive(InventoryAPITestCase):
self.checkRelativeUrlInSQLPathList(path_list, connection_id=self.original_connection_id) self.checkRelativeUrlInSQLPathList(path_list, connection_id=self.original_connection_id)
# Create new connectors for destination # Create new connectors for destination
addSQLConnection = portal.manage_addProduct['ZMySQLDA'] \
.manage_addZMySQLConnection
self.new_connection_id = 'erp5_sql_connection1' self.new_connection_id = 'erp5_sql_connection1'
db1, db2 = getExtraSqlConnectionStringList()[:2] db1, db2 = getExtraSqlConnectionStringList()[:2]
portal.manage_addZMySQLConnection(self.new_connection_id,'', addSQLConnection(self.new_connection_id,'', db1)
db1)
new_connection = portal[self.new_connection_id] new_connection = portal[self.new_connection_id]
new_connection.manage_open_connection() new_connection.manage_open_connection()
# the deferred one # the deferred one
self.new_deferred_connection_id = 'erp5_sql_connection2' self.new_deferred_connection_id = 'erp5_sql_connection2'
portal.manage_addZMySQLConnection(self.new_deferred_connection_id,'', addSQLConnection(self.new_deferred_connection_id,'', db1)
db1)
new_deferred_connection = portal[self.new_deferred_connection_id] new_deferred_connection = portal[self.new_deferred_connection_id]
new_deferred_connection.manage_open_connection() new_deferred_connection.manage_open_connection()
# Create new connectors for archive # Create new connectors for archive
self.archive_connection_id = 'erp5_sql_connection3' self.archive_connection_id = 'erp5_sql_connection3'
portal.manage_addZMySQLConnection(self.archive_connection_id,'', addSQLConnection(self.archive_connection_id,'', db2)
db2)
archive_connection = portal[self.archive_connection_id] archive_connection = portal[self.archive_connection_id]
archive_connection.manage_open_connection() archive_connection.manage_open_connection()
# the deferred one # the deferred one
self.archive_deferred_connection_id = 'erp5_sql_connection4' self.archive_deferred_connection_id = 'erp5_sql_connection4'
portal.manage_addZMySQLConnection(self.archive_deferred_connection_id,'', addSQLConnection(self.archive_deferred_connection_id,'', db2)
db2)
archive_deferred_connection = portal[self.archive_deferred_connection_id] archive_deferred_connection = portal[self.archive_deferred_connection_id]
archive_deferred_connection.manage_open_connection() archive_deferred_connection.manage_open_connection()
......
...@@ -1495,13 +1495,13 @@ class TestERP5Catalog(ERP5TypeTestCase, LogInterceptor): ...@@ -1495,13 +1495,13 @@ class TestERP5Catalog(ERP5TypeTestCase, LogInterceptor):
title="GreatTitle2") title="GreatTitle2")
# Flush message queue # Flush message queue
self.tic() self.tic()
addSQLConnection = portal.manage_addProduct['ZMySQLDA'] \
.manage_addZMySQLConnection
# Create new connectors # Create new connectors
portal.manage_addZMySQLConnection(self.new_connection_id,'', addSQLConnection(self.new_connection_id,'', new_connection_string)
new_connection_string)
new_connection = portal[self.new_connection_id] new_connection = portal[self.new_connection_id]
new_connection.manage_open_connection() new_connection.manage_open_connection()
portal.manage_addZMySQLConnection(self.new_deferred_connection_id,'', addSQLConnection(self.new_deferred_connection_id,'', new_connection_string)
new_connection_string)
new_connection = portal[self.new_deferred_connection_id] new_connection = portal[self.new_deferred_connection_id]
new_connection.manage_open_connection() new_connection.manage_open_connection()
# the transactionless connector must not be change because this one # the transactionless connector must not be change because this one
...@@ -1648,11 +1648,12 @@ class TestERP5Catalog(ERP5TypeTestCase, LogInterceptor): ...@@ -1648,11 +1648,12 @@ class TestERP5Catalog(ERP5TypeTestCase, LogInterceptor):
LOG('Testing... ',0, message) LOG('Testing... ',0, message)
# Create new connectors # Create new connectors
portal.manage_addZMySQLConnection(self.new_erp5_sql_connection,'', addSQLConnection = portal.manage_addProduct['ZMySQLDA'] \
new_connection_string) .manage_addZMySQLConnection
addSQLConnection(self.new_erp5_sql_connection,'', new_connection_string)
new_connection = portal[self.new_erp5_sql_connection] new_connection = portal[self.new_erp5_sql_connection]
new_connection.manage_open_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_string)
new_connection = portal[self.new_erp5_deferred_sql_connection] new_connection = portal[self.new_erp5_deferred_sql_connection]
new_connection.manage_open_connection() new_connection.manage_open_connection()
......
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