[Erp5-report] r16207 - /erp5/trunk/products/ERP5/tests/testBusinessTemplate.py

nobody at svn.erp5.org nobody at svn.erp5.org
Mon Sep 10 11:18:20 CEST 2007


Author: aurel
Date: Mon Sep 10 11:18:19 2007
New Revision: 16207

URL: http://svn.erp5.org?rev=16207&view=rev
Log:
instead of defining a non sense method for getitem by uid, copy and
paste the current one and with this new one

Modified:
    erp5/trunk/products/ERP5/tests/testBusinessTemplate.py

Modified: erp5/trunk/products/ERP5/tests/testBusinessTemplate.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/tests/testBusinessTemplate.py?rev=16207&r1=16206&r2=16207&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/tests/testBusinessTemplate.py (original)
+++ erp5/trunk/products/ERP5/tests/testBusinessTemplate.py Mon Sep 10 11:18:19 2007
@@ -1324,7 +1324,14 @@
     """
     catalog = self.getCatalogTool().getSQLCatalog()
     # modify method related configuration
-    catalog.sql_getitem_by_uid = 'z_search_results'
+    copy_data = catalog.manage_copyObjects(ids=["z_getitem_by_uid"])
+    ids = catalog.manage_pasteObjects(copy_data)
+    new_id = ids[0]['new_id']    
+    new_method = catalog._getOb(new_id)
+    catalog.manage_renameObjects([new_id,], ["z_getitem_by_uid_2",])
+    new_method = catalog._getOb("z_getitem_by_uid_2")
+    self.assertNotEqual(new_method, None)
+    catalog.sql_getitem_by_uid = 'z_getitem_by_uid_2'
     # modify table related configuration
     catalog.sql_search_tables = tuple( list(catalog.sql_search_tables) +
                                      ['translation'] )
@@ -1339,7 +1346,7 @@
     """
     catalog = self.getCatalogTool().getSQLCatalog()
     # method related configuration
-    self.assertEquals(catalog.sql_getitem_by_uid, 'z_search_results')
+    self.assertEquals(catalog.sql_getitem_by_uid, 'z_getitem_by_uid_2')
     # table related configuration
     self.failUnless('translation' in catalog.sql_search_tables)
     # column related configuration




More information about the Erp5-report mailing list