From baecf725808e00d6b2929bcf70c326b4f969516c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?J=C3=A9rome=20Perrin?= <jerome@nexedi.com>
Date: Fri, 13 Jan 2006 18:14:42 +0000
Subject: [PATCH] It makes no sense to define a sort order in the matrix, this
 feature is therefore removed.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@5119 20353a03-c40f-0410-a6d1-a30d3c3de9de
---
 product/ERP5/tests/testAccountingRules.py | 53 -----------------------
 1 file changed, 53 deletions(-)

diff --git a/product/ERP5/tests/testAccountingRules.py b/product/ERP5/tests/testAccountingRules.py
index 1f079196c0..25a8b97e8c 100755
--- a/product/ERP5/tests/testAccountingRules.py
+++ b/product/ERP5/tests/testAccountingRules.py
@@ -1796,59 +1796,6 @@ class TestAccountingRules(ERP5TypeTestCase):
     #   quantity from sum of receivable movement
     #   link to sale invoice
  
-  def test_08_GetMatchingCellIntIndex(self, quiet=0, run=RUN_ALL_TESTS):
-    """ Int index order in getMatchingCell.
-    When defining a matrix rule, predicates must be tested in the order 
-    defined by 'int_index' property on those predicates.
-    """
-    if not run:
-      return
-    if not quiet:
-      message = 'Int index order in getMatchingCell'
-      ZopeTestCase._print('\n%s ' % message)
-      LOG('Testing... ', INFO, message)
-       
-    # create a matrix
-    #     1a    2b
-    # 1x a*x   b*x 
-    # 2y a*y   b*y
-    
-    rule = self.getPortal().portal_rules.newContent(
-          portal_type = self.invoice_transaction_rule_portal_type)
-    predicate_1a = rule.newContent(
-        portal_type = self.predicate_portal_type,
-        string_index = "product",
-        id = "1a",
-        int_index = 1)
-    predicate_2b = rule.newContent(
-        portal_type = self.predicate_portal_type,
-        string_index = "product",
-        id = "2b",
-        int_index = 2)
-    predicate_1x = rule.newContent(
-        portal_type = self.predicate_portal_type,
-        string_index = "region",
-        id = "1x",
-        int_index = 1)
-    predicate_2y = rule.newContent(
-        portal_type = self.predicate_portal_type,
-        string_index = "region",
-        id = "2y",
-        int_index = 2)
-    get_transaction().commit()
-    self.tic()
-    rule.updateMatrix()
-    
-    # make sure predicates are checked in the right order
-    previous_priority = -100
-    for key_list in rule._getSortedCellKeyList():
-      priority = 0
-      for index, path in enumerate(key_list) :
-        priority += self.getPortal().restrictedTraverse(path).getIntIndex()
-      self.assert_( previous_priority <= priority,
-                    "%s <= %s" % (previous_priority, priority))
-      previous_priority = priority
-    
 if __name__ == '__main__':
   framework()
 else:
-- 
2.30.9