Commit 08657d40 authored by Kazuhiko Shiozaki's avatar Kazuhiko Shiozaki

correct assertions for payment transaction especially in Purchase case.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@32830 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 8215891f
...@@ -464,6 +464,24 @@ class TestInvoiceMixin(TestPackingListMixin, ...@@ -464,6 +464,24 @@ class TestInvoiceMixin(TestPackingListMixin,
order_root_applied_rule) order_root_applied_rule)
self.assertEquals(total_quantity, movement.getQuantity()) self.assertEquals(total_quantity, movement.getQuantity())
def checkMirrorAcquisition(self, object, acquired_object):
"""
Check if properties are well acquired for mirrored case
"""
# packing_list_movement, simulation_movement
self.assertEquals(acquired_object.getStartDate(), object.getStopDate())
self.assertEquals(acquired_object.getStopDate(), object.getStartDate())
self.assertEquals(acquired_object.getSourceValue(), \
object.getDestinationValue())
self.assertEquals(acquired_object.getDestinationValue(), \
object.getSourceValue())
self.assertEquals(acquired_object.getSourceSectionValue(), \
object.getDestinationSectionValue())
self.assertEquals(acquired_object.getDestinationSectionValue(), \
object.getSourceSectionValue())
def stepCheckInvoiceBuilding(self, sequence=None, sequence_list=None, **kw): def stepCheckInvoiceBuilding(self, sequence=None, sequence_list=None, **kw):
""" """
checks that the invoice is built with the default_invoice_builder checks that the invoice is built with the default_invoice_builder
...@@ -632,6 +650,10 @@ class TestInvoiceMixin(TestPackingListMixin, ...@@ -632,6 +650,10 @@ class TestInvoiceMixin(TestPackingListMixin,
self.assertEquals(payment_movement.getVariationCategoryList(), \ self.assertEquals(payment_movement.getVariationCategoryList(), \
related_simulation_movement.getVariationCategoryList()) related_simulation_movement.getVariationCategoryList())
# Test acquisition # Test acquisition
if invoice.getPortalType() == 'Purchase Invoice Transaction':
self.checkMirrorAcquisition(payment_movement,
related_simulation_movement)
else:
self.checkAcquisition(payment_movement, self.checkAcquisition(payment_movement,
related_simulation_movement) related_simulation_movement)
# Test delivery ratio # Test delivery ratio
......
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