[Erp5-report] r36148 nicolas - /erp5/trunk/products/ERP5Catalog/tests/testERP5Catalog.py

nobody at svn.erp5.org nobody at svn.erp5.org
Wed Jun 9 11:59:55 CEST 2010


Author: nicolas
Date: Wed Jun  9 11:59:55 2010
New Revision: 36148

URL: http://svn.erp5.org?rev=36148&view=rev
Log:
Show that we can not use new catalog structure after 
catalog clearing without clearing cache.


Modified:
    erp5/trunk/products/ERP5Catalog/tests/testERP5Catalog.py

Modified: erp5/trunk/products/ERP5Catalog/tests/testERP5Catalog.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5Catalog/tests/testERP5Catalog.py?rev=36148&r1=36147&r2=36148&view=diff
==============================================================================
--- erp5/trunk/products/ERP5Catalog/tests/testERP5Catalog.py [utf8] (original)
+++ erp5/trunk/products/ERP5Catalog/tests/testERP5Catalog.py [utf8] Wed Jun  9 11:59:55 2010
@@ -1732,6 +1732,15 @@
     sql_search_table_list.append('dummy')
     sql_search_table_list.sort()
     new_catalog.sql_search_tables = tuple(sql_search_table_list)
+    portal_catalog.manage_catalogClear()
+    transaction.commit()
+    # Catalog structure changed, so we should be able to build new queries
+    # with new table columns
+    # Check that column map is updated according new structure of catalog.
+    self.assertTrue('dummy.dummy_title' in portal_catalog.getSQLCatalog().getColumnMap())
+    # Check more cached methods of SQLCatalog by building SQLQuery
+    query = portal_catalog.getSQLCatalog().buildQuery(kw={'dummy.dummy_title': 'Foo'})
+    self.assertTrue(query.query_list)
 
     # prepare arguments for hot reindex
     source_sql_connection_id_list=list((self.original_connection_id,




More information about the Erp5-report mailing list