From a071a4fa7a0f715d288fc8c7c27222982af277c8 Mon Sep 17 00:00:00 2001
From: Vincent Pelletier <vincent@nexedi.com>
Date: Thu, 10 Jun 2010 17:38:28 +0000
Subject: [PATCH] Cleanup: There is no need to rename new catalog.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@36247 20353a03-c40f-0410-a6d1-a30d3c3de9de
---
 product/ERP5Catalog/tests/testERP5Catalog.py | 13 +++++--------
 1 file changed, 5 insertions(+), 8 deletions(-)

diff --git a/product/ERP5Catalog/tests/testERP5Catalog.py b/product/ERP5Catalog/tests/testERP5Catalog.py
index d9d83ae98c..a839e00069 100644
--- a/product/ERP5Catalog/tests/testERP5Catalog.py
+++ b/product/ERP5Catalog/tests/testERP5Catalog.py
@@ -1692,14 +1692,11 @@ class TestERP5Catalog(ERP5TypeTestCase, LogInterceptor):
 
     # Create new catalog
     portal_catalog = self.getCatalogTool()
-    original_catalog_id = 'erp5_mysql_innodb'
-    self.new_catalog_id = self.original_catalog_id + '2'
-    cp_data = portal_catalog.manage_copyObjects(ids=('erp5_mysql_innodb',))
-    new_id = portal_catalog.manage_pasteObjects(cp_data)[0]['new_id']
-    portal_catalog.manage_renameObject(id=new_id, new_id=self.new_catalog_id)
-
-    # Parse all methods in the new catalog in order to change the connector
-    new_catalog = portal_catalog[self.new_catalog_id]
+    original_catalog = portal_catalog.getSQLCatalog()
+    original_catalog_id = original_catalog.getId()
+    cp_data = portal_catalog.manage_copyObjects(ids=(original_catalog_id,))
+    new_catalog_id = portal_catalog.manage_pasteObjects(cp_data)[0]['new_id']
+    new_catalog = portal_catalog[new_catalog_id]
 
     # Add new searchable table in new catalog
     create_dummy_table_sql = """
-- 
2.30.9