[Erp5-report] r27511 - /erp5/trunk/products/ERP5/tests/testBPMCore.py
nobody at svn.erp5.org
nobody at svn.erp5.org
Thu Jun 11 09:46:01 CEST 2009
Author: fabien
Date: Thu Jun 11 09:46:01 2009
New Revision: 27511
URL: http://svn.erp5.org?rev=27511&view=rev
Log:
- remove an usued import
- fix a test name
- add doc string to make easier to understand dependance tests
Modified:
erp5/trunk/products/ERP5/tests/testBPMCore.py
Modified: erp5/trunk/products/ERP5/tests/testBPMCore.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/tests/testBPMCore.py?rev=27511&r1=27510&r2=27511&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/tests/testBPMCore.py [utf8] (original)
+++ erp5/trunk/products/ERP5/tests/testBPMCore.py [utf8] Thu Jun 11 09:46:01 2009
@@ -31,7 +31,6 @@
import transaction
from Products.ERP5Type.tests.ERP5TypeTestCase import ERP5TypeTestCase
-from AccessControl.SecurityManagement import newSecurityManager
from DateTime import DateTime
from Products.ERP5Type.tests.Sequence import SequenceList
@@ -2152,12 +2151,30 @@
self.PACKING_LIST_SPLIT_INVOICE_BUILD_SEQUENCE_STRING)
sequence_list.play(self)
- def test_getAggregatedAmountListWithComplexModelLinesCreateInGoodOrder(self):
+ def test_getAggregatedAmountListWithComplexModelLinesCreateInEasyOrder(self):
"""
Test the return of getAggregatedAmountList in the case of many model lines
depending each others. In this test, lines are created in the order of the
dependancies (it means that if a line A depend of a line B, line B is
created before A). This is the most easy case.
+
+ Dependance tree :
+ ModelLineTaxContributingToTotalTax : A
+ ModelLineDiscountContributingToTotalDiscount : B
+ ModelLineTaxContributingToTotalTax2 : C
+ ModelLineTotalTax : D
+ ModelLineTotalDiscount : E
+
+ D E
+ \ /
+ \ /
+ \ /
+ C B
+ \ /
+ \ /
+ \/
+ A
+ Model line creation order : E, D, C, B, A
"""
sequence_list = SequenceList()
sequence_string = self.COMMON_DOCUMENTS_CREATION_SEQUENCE_STRING + """
@@ -2205,6 +2222,24 @@
line B, line A can be created before line B). getAggregatedAmountList
should be able to handle this case and redo calculation unill all
dependancies are satified
+
+ Dependance tree :
+ ModelLineTaxContributingToTotalTax : A
+ ModelLineDiscountContributingToTotalDiscount : B
+ ModelLineTaxContributingToTotalTax2 : C
+ ModelLineTotalTax : D
+ ModelLineTotalDiscount : E
+
+ D E
+ \ /
+ \ /
+ \ /
+ C B
+ \ /
+ \ /
+ \/
+ A
+ Model line creation order : A, C, D, B, E
"""
sequence_list = SequenceList()
sequence_string = self.COMMON_DOCUMENTS_CREATION_SEQUENCE_STRING + """
More information about the Erp5-report
mailing list