Commit a5ec6e1f authored by Aurel's avatar Aurel

instead of defining a non sense method for getitem by uid, copy and

paste the current one and with this new one


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@16207 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 230fb4df
...@@ -1324,7 +1324,14 @@ class TestBusinessTemplate(ERP5TypeTestCase, LogInterceptor): ...@@ -1324,7 +1324,14 @@ class TestBusinessTemplate(ERP5TypeTestCase, LogInterceptor):
""" """
catalog = self.getCatalogTool().getSQLCatalog() catalog = self.getCatalogTool().getSQLCatalog()
# modify method related configuration # 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 # modify table related configuration
catalog.sql_search_tables = tuple( list(catalog.sql_search_tables) + catalog.sql_search_tables = tuple( list(catalog.sql_search_tables) +
['translation'] ) ['translation'] )
...@@ -1339,7 +1346,7 @@ class TestBusinessTemplate(ERP5TypeTestCase, LogInterceptor): ...@@ -1339,7 +1346,7 @@ class TestBusinessTemplate(ERP5TypeTestCase, LogInterceptor):
""" """
catalog = self.getCatalogTool().getSQLCatalog() catalog = self.getCatalogTool().getSQLCatalog()
# method related configuration # 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 # table related configuration
self.failUnless('translation' in catalog.sql_search_tables) self.failUnless('translation' in catalog.sql_search_tables)
# column related configuration # column related configuration
......
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