[Erp5-report] r28756 - /erp5/trunk/products/ERP5/tests/testPayroll_l10n_fr.py

nobody at svn.erp5.org nobody at svn.erp5.org
Wed Sep 2 17:31:04 CEST 2009


Author: fabien
Date: Wed Sep  2 17:31:01 2009
New Revision: 28756

URL: http://svn.erp5.org?rev=28756&view=rev
Log:
fix failing test : dates were the same on the 2 paysheet, so the
getYearToDateSlice script couldn't works. Now start_date and stop date are
different on both paysheet.

Modified:
    erp5/trunk/products/ERP5/tests/testPayroll_l10n_fr.py

Modified: erp5/trunk/products/ERP5/tests/testPayroll_l10n_fr.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/tests/testPayroll_l10n_fr.py?rev=28756&r1=28755&r2=28756&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/tests/testPayroll_l10n_fr.py [utf8] (original)
+++ erp5/trunk/products/ERP5/tests/testPayroll_l10n_fr.py [utf8] Wed Sep  2 17:31:01 2009
@@ -32,6 +32,8 @@
 
 from Products.ERP5Type.tests.Sequence import SequenceList
 from Products.ERP5.tests.testPayroll import TestPayrollMixin
+from DateTime import DateTime
+import transaction
 
 class TestPayroll_l10n_fr(TestPayrollMixin):
 
@@ -64,10 +66,17 @@
         'Pay Sheet Transaction')
     self.assertEquals(len(paysheet_list), 2) # 2 paysheet have been created
                                              # for this test
+
+    # set nice date on paysheet (ie. one paysheet per month)
+    paysheet_list[0].setStartDate(DateTime('2009/06/01'))
+    paysheet_list[0].setStopDate(DateTime('2009/06/30'))
+    paysheet_list[1].setStartDate(DateTime('2009/07/01'))
+    paysheet_list[1].setStopDate(DateTime('2009/07/31'))
     for paysheet in paysheet_list:
       # the script used for calculation only take into account stopped or
       # delivered paysheet
       paysheet.stop()
+    transaction.commit()
     self.stepTic()
 
     # here, check how much is contributed to the slices




More information about the Erp5-report mailing list