From ed970cf9e9f33739b0fee3af0df133390a6bba59 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Aur=C3=A9lien=20Calonne?= <aurel@nexedi.com> Date: Fri, 25 Nov 2011 14:13:00 +0100 Subject: [PATCH] when no price returned, line must not be created, fix the test --- product/ERP5/tests/testPayroll.py | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/product/ERP5/tests/testPayroll.py b/product/ERP5/tests/testPayroll.py index eef09f5d48..e489b9f5b3 100644 --- a/product/ERP5/tests/testPayroll.py +++ b/product/ERP5/tests/testPayroll.py @@ -640,7 +640,7 @@ class TestPayrollMixin(TestTradeModelLineMixin, ERP5ReportTestCase): paysheet_line_list = paysheet.contentValues(portal_type='Pay Sheet Line') self.assertEqual(len(paysheet_line_list), 0) self.assertEqual(len(paysheet.getMovementList(portal_type=\ - 'Pay Sheet Cell')), 0) # 2 because labour line contain no movement + 'Pay Sheet Cell')), 0) # 0 because labour line contain no movement def stepCheckPaysheetLineAreCreatedUsingBonus(self, sequence=None, **kw): paysheet = sequence.get('paysheet') @@ -2206,8 +2206,7 @@ class TestPayroll(TestPayrollMixin): def test_modelLineWithNonePrice(self): ''' - test the creation of lines when the price is not set, but only the - quantity. This means that no ratio is applied on this line. + Test that no line is created when quantity is set but not price ''' sequence_list = SequenceList() sequence_string = """ @@ -2226,10 +2225,7 @@ class TestPayroll(TestPayrollMixin): CheckUpdateAggregatedAmountListReturn PaysheetApplyTransformation Tic - CheckPaysheetLineAreCreated - CheckPaysheetLineAmountsWithQuantityOnly - CheckUpdateAggregatedAmountListReturnNothing - CheckPaysheetLineAmountsWithQuantityOnly + CheckThereIsOnlyOnePaysheetLine """ sequence_list.addSequenceString(sequence_string) sequence_list.play(self) -- 2.30.9