[Erp5-report] r6325 - /erp5/trunk/products/ERP5/Document/Predicate.py

nobody at svn.erp5.org nobody at svn.erp5.org
Tue Mar 28 10:21:11 CEST 2006


Author: jerome
Date: Tue Mar 28 10:21:08 2006
New Revision: 6325

URL: http://svn.erp5.org?rev=6325&view=rev
Log:
Test all methods if multiple ones are defined

Modified:
    erp5/trunk/products/ERP5/Document/Predicate.py

Modified: erp5/trunk/products/ERP5/Document/Predicate.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/Document/Predicate.py?rev=6325&r1=6324&r2=6325&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/Document/Predicate.py (original)
+++ erp5/trunk/products/ERP5/Document/Predicate.py Tue Mar 28 10:21:08 2006
@@ -156,16 +156,18 @@
 #    LOG('predicate test', 0, 
 #        '%s after category %s ' % (result, tested_base_category.items()))
     # Test method calls
-    test_method_id = self.getTestMethodId()
-    if (test_method_id is not None) and result:
-      method = getattr(context,test_method_id)
-      result = result and method()
-#    LOG('predicate test', 0, 
-#        '%s after method %s ' % (result, test_method_id))
-    # XXX Add here additional method calls
+    test_method_id_list = self.getTestMethodIdList()
+    if test_method_id_list is not None :
+      for test_method_id in test_method_id_list :
+        if (test_method_id is not None) and result:
+          method = getattr(context,test_method_id)
+          result = result and method()
+#        LOG('predicate test', 0, 
+#            '%s after method %s ' % (result, test_method_id))
     return result
 
-  security.declareProtected( Permissions.AccessContentsInformation, 'buildSqlQuery' )
+  security.declareProtected( Permissions.AccessContentsInformation,
+                             'buildSqlQuery' )
   def buildSqlQuery(self, strict_membership=0, table='category',
                           join_table='catalog', join_column='uid'):
     """




More information about the Erp5-report mailing list