[Erp5-report] r32825 kazuhiko - /erp5/trunk/products/ERP5/tests/testInvoice.py
nobody at svn.erp5.org
nobody at svn.erp5.org
Fri Feb 19 06:17:27 CET 2010
Author: kazuhiko
Date: Fri Feb 19 06:17:26 2010
New Revision: 32825
URL: http://svn.erp5.org?rev=32825&view=rev
Log:
more assertions for payment transaction especially in Purchase case.
Modified:
erp5/trunk/products/ERP5/tests/testInvoice.py
Modified: erp5/trunk/products/ERP5/tests/testInvoice.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/tests/testInvoice.py?rev=32825&r1=32824&r2=32825&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/tests/testInvoice.py [utf8] (original)
+++ erp5/trunk/products/ERP5/tests/testInvoice.py [utf8] Fri Feb 19 06:17:26 2010
@@ -472,7 +472,10 @@
related_invoice_list = packing_list.getCausalityRelatedValueList(
portal_type=self.invoice_portal_type)
- packing_list_building_state = 'started'
+ 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 :
self.assertEquals(0, len(related_invoice_list))
@@ -572,6 +575,18 @@
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 = []
More information about the Erp5-report
mailing list