Commit 3f6f51f0 authored by Fabien Morin's avatar Fabien Morin

change some method name, add a new step, fix some mistakes


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@27731 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 34a0a942
...@@ -602,6 +602,15 @@ class TestPayrollMixin(ERP5ReportTestCase, TestBPMMixin): ...@@ -602,6 +602,15 @@ class TestPayrollMixin(ERP5ReportTestCase, TestBPMMixin):
# (urssaf and sickness insurance. old age # (urssaf and sickness insurance. old age
# insurance does not match predicate) # insurance does not match predicate)
def stepCheckPaysheetLineAreCreatedAfterUpdateWithLinesWithSameResource(self, sequence=None, **kw):
paysheet = sequence.get('paysheet')
paysheet_line_list = paysheet.contentValues(portal_type='Pay Sheet Line')
self.assertEqual(len(paysheet_line_list), 3)
self.assertEqual(len(paysheet.getMovementList(portal_type=\
'Pay Sheet Cell')), 8) # 8 because labour line contain no movement and
# because of the 3 slice and 2 tax_categories
# + the first model line with 2 tax_categories
def stepCheckPaysheetLineAmounts(self, sequence=None, **kw): def stepCheckPaysheetLineAmounts(self, sequence=None, **kw):
paysheet = sequence.get('paysheet') paysheet = sequence.get('paysheet')
paysheet_line_list = paysheet.contentValues(portal_type='Pay Sheet Line') paysheet_line_list = paysheet.contentValues(portal_type='Pay Sheet Line')
...@@ -720,7 +729,7 @@ class TestPayrollMixin(ERP5ReportTestCase, TestBPMMixin): ...@@ -720,7 +729,7 @@ class TestPayrollMixin(ERP5ReportTestCase, TestBPMMixin):
else: else:
self.fail("Unknown service for line %s" % paysheet_line.getTitle()) self.fail("Unknown service for line %s" % paysheet_line.getTitle())
def stepCheckPaysheetLineAmountsAfterUpdateUsing2LinesWithSameResource(self, def stepCheckPaysheetLineAmountsAfterUpdateWithLinesWithSameResource(self,
sequence=None, **kw): sequence=None, **kw):
paysheet = sequence.get('paysheet') paysheet = sequence.get('paysheet')
paysheet_line_list = paysheet.contentValues(portal_type='Pay Sheet Line') paysheet_line_list = paysheet.contentValues(portal_type='Pay Sheet Line')
...@@ -756,11 +765,11 @@ class TestPayrollMixin(ERP5ReportTestCase, TestBPMMixin): ...@@ -756,11 +765,11 @@ class TestPayrollMixin(ERP5ReportTestCase, TestBPMMixin):
self.assertEquals(cell6.getPrice(), 0.6) self.assertEquals(cell6.getPrice(), 0.6)
else: else:
cell1 = paysheet_line.getCell('tax_category/employee_share') cell1 = paysheet_line.getCell('tax_category/employee_share')
self.assertEquals(cell1.getQuantity(), -100) self.assertEquals(cell1.getQuantity(), 3000)
self.assertEquals(cell1.getPrice(), 1) self.assertEquals(cell1.getPrice(), 0.1)
cell2 = paysheet_line.getCell('tax_category/employer_share') cell2 = paysheet_line.getCell('tax_category/employer_share')
self.assertEquals(cell2.getQuantity(), -200) self.assertEquals(cell2.getQuantity(), 3000)
self.assertEquals(cell2.getPrice(), 1) self.assertEquals(cell2.getPrice(), 0.5)
elif service == 'Labour': elif service == 'Labour':
self.assertEqual(paysheet_line.getTotalPrice(), 3000.0) self.assertEqual(paysheet_line.getTotalPrice(), 3000.0)
else: else:
...@@ -3332,15 +3341,15 @@ class TestPayroll(TestPayrollMixin): ...@@ -3332,15 +3341,15 @@ class TestPayroll(TestPayrollMixin):
CheckPaysheetLineAmounts CheckPaysheetLineAmounts
CheckUpdateAggregatedAmountListReturnNothing CheckUpdateAggregatedAmountListReturnNothing
CheckPaysheetLineAmounts CheckPaysheetLineAmounts
ModelCreateUrssafModelLineWithComplexSlices ModelCreateUrssafModelLineWithSlices
Tic Tic
UrssafModelLineWithComplexSlicesCreateMovements UrssafModelLineWithSlicesCreateMovements
PaysheetApplyTransformation PaysheetApplyTransformation
Tic Tic
CheckPaysheetLineAreCreatedUsingWith3Lines CheckPaysheetLineAreCreatedAfterUpdateWithLinesWithSameResource
CheckPaysheetLineAmountsAfterUpdateUsing2LinesWithSameResource CheckPaysheetLineAmountsAfterUpdateWithLinesWithSameResource
CheckUpdateAggregatedAmountListReturnNothing CheckUpdateAggregatedAmountListReturnNothing
CheckPaysheetLineAmountsAfterUpdateUsing2LinesWithSameResource CheckPaysheetLineAmountsAfterUpdateWithLinesWithSameResource
''' '''
sequence_list.addSequenceString(sequence_string) sequence_list.addSequenceString(sequence_string)
sequence_list.play(self) sequence_list.play(self)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment