Commit 289b8568 authored by Kazuhiko Shiozaki's avatar Kazuhiko Shiozaki

more assertions for payment transaction especially in Purchase case.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@32825 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 5e375e62
......@@ -472,6 +472,9 @@ class TestInvoiceMixin(TestPackingListMixin,
related_invoice_list = packing_list.getCausalityRelatedValueList(
portal_type=self.invoice_portal_type)
if packing_list.getPortalType() == 'Purchase Packing List':
packing_list_building_state = 'stopped'
else:
packing_list_building_state = 'started'
packing_list_state = packing_list.getSimulationState()
if packing_list_state != packing_list_building_state :
......@@ -572,6 +575,18 @@ class TestInvoiceMixin(TestPackingListMixin,
self.failUnless(payment is not None)
# Payments created by Delivery Builder are in planned state
self.assertEquals(payment.getSimulationState(), 'planned')
# Test source section and destination section of payment, that
# should be reversed for Purchase case.
if invoice.getPortalType() == 'Purchase Invoice Transaction':
self.assertEquals(payment.getSourceSection(), \
invoice.getDestinationSection())
self.assertEquals(payment.getDestinationSection(), \
invoice.getSourceSection())
else:
self.assertEquals(payment.getSourceSection(), \
invoice.getSourceSection())
self.assertEquals(payment.getDestinationSection(), \
invoice.getDestinationSection())
# Get the list of simulation movements of packing list ...
invoice_simulation_movement_list = []
......
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