diff --git a/product/ERP5/tests/testAccountingRules.py b/product/ERP5/tests/testAccountingRules.py
index 8b2dbad24023cd076bc0ee528d5c647a0727a3cd..6f47fdf39b4848640a5d1bd67c1924920c8529c2 100644
--- a/product/ERP5/tests/testAccountingRules.py
+++ b/product/ERP5/tests/testAccountingRules.py
@@ -507,9 +507,8 @@ class TestAccountingRules(TestAccountingRulesMixin, ERP5TypeTestCase):
     # clear the message queue, so that it does not contains unexistant paths
     self.tic()
     payment_rule.deleteContent(
-      [x.getId() for x in payment_rule.objectValues() if \
-       x.getPortalType() == self.predicate_portal_type])
-    self.assertEquals(len(payment_rule.objectValues()), 1)
+      [x.getId() for x in payment_rule.objectValues(
+      portal_type=['Predicate', self.accounting_rule_cell_portal_type])])
     transaction.commit()
 
     # and add a new predicate