From 99205513f14d4c0cb3512d05ae0ba7338081d9f2 Mon Sep 17 00:00:00 2001
From: Fabien Morin <fabien@nexedi.com>
Date: Thu, 17 Sep 2009 16:09:57 +0000
Subject: [PATCH] fix problems introduced by r29073

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

diff --git a/product/ERP5/tests/testPayroll.py b/product/ERP5/tests/testPayroll.py
index 651da31afe..d9ca54a125 100644
--- a/product/ERP5/tests/testPayroll.py
+++ b/product/ERP5/tests/testPayroll.py
@@ -30,7 +30,6 @@ from Products.ERP5.tests.testTradeModelLine import TestTradeModelLineMixin
 from AccessControl.SecurityManagement import newSecurityManager
 from Products.ERP5Type.tests.Sequence import SequenceList
 from Products.ERP5Type.tests.utils import reindex
-from Products.CMFCore.utils import getToolByName
 from DateTime import DateTime
 import transaction
 
@@ -1445,12 +1444,12 @@ class TestPayrollMixin(ERP5ReportTestCase, TestTradeModelLineMixin):
     movement_list = paysheet.PaySheetTransaction_getMovementList()
     self.assertEquals(1, len(movement_list))
     movement = movement_list[0]
-    self.assertEquals(2, movement.employee_share_price)
-    self.assertEquals(3, movement.employee_share_quantity)
-    self.assertEquals(2*3, movement.employee_share_total_price)
-    self.assertEquals(4, movement.employer_share_price)
-    self.assertEquals(5, movement.employer_share_quantity)
-    self.assertEquals(4*5, movement.employer_share_total_price)
+    self.assertEquals(2, movement.employee_price)
+    self.assertEquals(3, movement.employee_quantity)
+    self.assertEquals(2*3, movement.employee_total_price)
+    self.assertEquals(4, movement.employer_price)
+    self.assertEquals(5, movement.employer_quantity)
+    self.assertEquals(4*5, movement.employer_total_price)
 
   def stepCheckModelWithoutRefValidity(self, sequence=None, **kw):
     '''
@@ -2541,22 +2540,22 @@ class TestPayroll(TestPayrollMixin):
                             employee_career_reference='E1',
                             employee_title='Employee One',
                             base=2000,
-                            employee_share=2000 * .50,
-                            employer_share=2000 * .40,
+                            employee=2000 * .50,
+                            employer=2000 * .40,
                             total=(2000 * .50 + 2000 * .40))
     self.checkLineProperties(data_line_list[1],
                             id=2,
                             employee_career_reference='E2',
                             employee_title='Employee Two',
                             base=3000,
-                            employee_share=3000 * .50,
-                            employer_share=3000 * .40,
+                            employee=3000 * .50,
+                            employer=3000 * .40,
                             total=(3000 * .50 + 3000 * .40))
     # stat line
     self.checkLineProperties(line_list[-1],
                             base=3000 + 2000,
-                            employee_share=(3000 + 2000) * .50,
-                            employer_share=(3000 + 2000) * .40,
+                            employee=(3000 + 2000) * .50,
+                            employer=(3000 + 2000) * .40,
                             total=((3000 + 2000) * .50 + (3000 + 2000) * .40))
 
   def test_PayrollTaxesReportDifferentSalaryRange(self):
@@ -2726,22 +2725,22 @@ class TestPayroll(TestPayrollMixin):
                             employee_career_reference='E1',
                             employee_title='Employee One',
                             base=1000,
-                            employee_share=1000 * .50,
-                            employer_share=1000 * .40,
+                            employee=1000 * .50,
+                            employer=1000 * .40,
                             total=(1000 * .50 + 1000 * .40))
     self.checkLineProperties(data_line_list[1],
                             id=2,
                             employee_career_reference='E2',
                             employee_title='Employee Two',
                             base=1000,
-                            employee_share=1000 * .50,
-                            employer_share=1000 * .40,
+                            employee=1000 * .50,
+                            employer=1000 * .40,
                             total=(1000 * .50 + 1000 * .40))
     self.checkLineProperties(data_line_list[2],
                             employee_title='Total Slice A',
                             base=2000,
-                            employee_share=2000 * .50,
-                            employer_share=2000 * .40,
+                            employee=2000 * .50,
+                            employer=2000 * .40,
                             #total=(2000 * .50 + 2000 * .40)
                             )
 
@@ -2750,30 +2749,30 @@ class TestPayroll(TestPayrollMixin):
                             employee_career_reference='E1',
                             employee_title='Employee One',
                             base=500,
-                            employee_share=500 * .20,
-                            employer_share=500 * .32,
+                            employee=500 * .20,
+                            employer=500 * .32,
                             total=(500 * .20 + 500 * .32))
     self.checkLineProperties(data_line_list[4],
                             id=4,
                             employee_career_reference='E2',
                             employee_title='Employee Two',
                             base=3000,
-                            employee_share=3000 * .20,
-                            employer_share=3000 * .32,
+                            employee=3000 * .20,
+                            employer=3000 * .32,
                             total=(3000 * .20 + 3000 * .32))
     self.checkLineProperties(data_line_list[5],
                             employee_title='Total Slice B',
                             base=3500,
-                            employee_share=3500 * .20,
-                            employer_share=3500 * .32,
+                            employee=3500 * .20,
+                            employer=3500 * .32,
                             #total=(3500 * .20 + 3500 * .32),
                             )
 
     # stat line
     self.checkLineProperties(line_list[-1],
                             base=2000 + 3500,
-                            employee_share=(2000 * .50 + 3500 * .20),
-                            employer_share=(2000 * .40 + 3500 * .32),
+                            employee=(2000 * .50 + 3500 * .20),
+                            employer=(2000 * .40 + 3500 * .32),
                             total=((2000 * .50 + 3500 * .20) +
                                    (2000 * .40 + 3500 * .32)))
 
-- 
2.30.9