From a734a33f42c60368b1ec9ddac928cfddb78260f8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9rome=20Perrin?= <jerome@nexedi.com> Date: Thu, 17 Apr 2008 13:40:17 +0000 Subject: [PATCH] update test, now that Tax Rule is always applied git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@20614 20353a03-c40f-0410-a6d1-a30d3c3de9de --- product/ERP5/tests/testInvoice.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/product/ERP5/tests/testInvoice.py b/product/ERP5/tests/testInvoice.py index bc21fc912d..09f0be1746 100644 --- a/product/ERP5/tests/testInvoice.py +++ b/product/ERP5/tests/testInvoice.py @@ -268,7 +268,6 @@ class TestInvoice(TestPackingListMixin, packing_list = sequence.get('packing_list') self.assertEquals(packing_list.getSimulationState(), 'cancelled') - def modifyInvoiceState(self, transition_name, sequence,invoice=None): """ calls the workflow for the invoice """ @@ -448,9 +447,10 @@ class TestInvoice(TestPackingListMixin, invoice_transaction_rule_list = [] for order_rule in order_rule_list : for order_simulation_movement in order_rule.objectValues() : - temp_invoicing_rule_list = order_simulation_movement.objectValues() + temp_invoicing_rule_list = [ar for ar in order_simulation_movement.objectValues() + if ar.getSpecialiseValue().getPortalType() == 'Invoicing Rule'] self.assertEquals(len(temp_invoicing_rule_list), 1) - invoicing_rule_list.extend(order_simulation_movement.objectValues()) + invoicing_rule_list.extend(temp_invoicing_rule_list) sequence.edit(invoicing_rule_list=invoicing_rule_list) invoicing_rule = invoicing_rule_list[0] sequence.edit(invoicing_rule = invoicing_rule) @@ -960,7 +960,7 @@ class TestInvoice(TestPackingListMixin, rule_dict = { 'Order Rule': { 'movement_type_list': ['Sale Packing List Line', 'Sale Packing List Cell'], - 'next_rule_list': ['Invoicing Rule'], + 'next_rule_list': ['Invoicing Rule', 'Tax Rule'], }, 'Invoicing Rule': { 'movement_type_list': invoice.getPortalInvoiceMovementTypeList(), -- 2.30.9