Commit a734a33f authored by Jérome Perrin's avatar Jérome Perrin

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
parent e17b06bf
...@@ -268,7 +268,6 @@ class TestInvoice(TestPackingListMixin, ...@@ -268,7 +268,6 @@ class TestInvoice(TestPackingListMixin,
packing_list = sequence.get('packing_list') packing_list = sequence.get('packing_list')
self.assertEquals(packing_list.getSimulationState(), 'cancelled') self.assertEquals(packing_list.getSimulationState(), 'cancelled')
def modifyInvoiceState(self, transition_name, def modifyInvoiceState(self, transition_name,
sequence,invoice=None): sequence,invoice=None):
""" calls the workflow for the invoice """ """ calls the workflow for the invoice """
...@@ -448,9 +447,10 @@ class TestInvoice(TestPackingListMixin, ...@@ -448,9 +447,10 @@ class TestInvoice(TestPackingListMixin,
invoice_transaction_rule_list = [] invoice_transaction_rule_list = []
for order_rule in order_rule_list : for order_rule in order_rule_list :
for order_simulation_movement in order_rule.objectValues() : 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) 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) sequence.edit(invoicing_rule_list=invoicing_rule_list)
invoicing_rule = invoicing_rule_list[0] invoicing_rule = invoicing_rule_list[0]
sequence.edit(invoicing_rule = invoicing_rule) sequence.edit(invoicing_rule = invoicing_rule)
...@@ -960,7 +960,7 @@ class TestInvoice(TestPackingListMixin, ...@@ -960,7 +960,7 @@ class TestInvoice(TestPackingListMixin,
rule_dict = { rule_dict = {
'Order Rule': { 'Order Rule': {
'movement_type_list': ['Sale Packing List Line', 'Sale Packing List Cell'], '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': { 'Invoicing Rule': {
'movement_type_list': invoice.getPortalInvoiceMovementTypeList(), 'movement_type_list': invoice.getPortalInvoiceMovementTypeList(),
......
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