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

nobody at svn.erp5.org nobody at svn.erp5.org
Fri Mar 28 18:51:34 CET 2008


Author: yusei
Date: Fri Mar 28 18:51:34 2008
New Revision: 20202

URL: http://svn.erp5.org?rev=20202&view=rev
Log:
Fixed the test. content_type_registry will be removed in the middle of the unittest.

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=20202&r1=20201&r2=20202&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/tests/testBusinessTemplate.py (original)
+++ erp5/trunk/products/ERP5/tests/testBusinessTemplate.py Fri Mar 28 18:51:34 2008
@@ -83,8 +83,9 @@
     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 = getattr(portal, 'content_type_registry', None)
+    if (content_type_registry is not None and
+        'any' in content_type_registry.predicate_ids):
       content_type_registry.removePredicate('any')
       get_transaction().commit()
 




More information about the Erp5-report mailing list