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

nobody at svn.erp5.org nobody at svn.erp5.org
Thu Mar 27 10:56:15 CET 2008


Author: yusei
Date: Thu Mar 27 10:55:56 2008
New Revision: 20175

URL: http://svn.erp5.org?rev=20175&view=rev
Log:
Remove default predicate which matches anything for test.

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=20175&r1=20174&r2=20175&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/tests/testBusinessTemplate.py (original)
+++ erp5/trunk/products/ERP5/tests/testBusinessTemplate.py Thu Mar 27 10:55:56 2008
@@ -81,6 +81,12 @@
     sql = 'create table if not exists `fake_catalog` (`toto` BIGINT)'
     sql_connection.manage_test(sql)
     self._catch_log_errors()
+
+    # remove default predicate which matches anything
+    content_type_registry = portal.content_type_registry
+    if 'any' in content_type_registry.predicate_ids:
+      content_type_registry.removePredicate('any')
+      get_transaction().commit()
 
   def beforeTearDown(self):
     """Remove objects created tests."""




More information about the Erp5-report mailing list