[Erp5-report] r30181 - /erp5/trunk/products/ERP5/tests/testInvoice.py
nobody at svn.erp5.org
nobody at svn.erp5.org
Fri Oct 30 18:30:08 CET 2009
Author: kazuhiko
Date: Fri Oct 30 18:30:06 2009
New Revision: 30181
URL: http://svn.erp5.org?rev=30181&view=rev
Log:
use a Project not a Organisatino for source_project or destination_project values.
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=30181&r1=30180&r2=30181&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/tests/testInvoice.py [utf8] (original)
+++ erp5/trunk/products/ERP5/tests/testInvoice.py [utf8] Fri Oct 30 18:30:06 2009
@@ -426,6 +426,9 @@
portal_type='Organisation',
title='Other Entity',
price_currency=currency.getRelativeUrl())
+ other_project = self.portal.project_module.newContent(
+ portal_type='Project',
+ title='Other Project')
order.plan()
transaction.commit()
self.tic()
@@ -497,18 +500,18 @@
self.assertEquals(other_entity,
invoice_movement.getDestinationDecisionValue())
- order_line.setSourceProjectValue(other_entity)
+ order_line.setSourceProjectValue(other_project)
transaction.commit()
self.tic()
invoice_movement = invoice_applied_rule.contentValues()[0]
- self.assertEquals(other_entity,
+ self.assertEquals(other_project,
invoice_movement.getSourceProjectValue())
- order_line.setDestinationProjectValue(other_entity)
+ order_line.setDestinationProjectValue(other_project)
transaction.commit()
self.tic()
invoice_movement = invoice_applied_rule.contentValues()[0]
- self.assertEquals(other_entity,
+ self.assertEquals(other_project,
invoice_movement.getDestinationProjectValue())
order_line.setSourcePaymentValue(other_entity)
@@ -620,6 +623,9 @@
portal_type='Organisation',
title='Other Entity',
default_address_region=self.default_region)
+ other_project = self.portal.project_module.newContent(
+ portal_type='Project',
+ title='Other Project')
order.plan()
transaction.commit()
self.tic()
@@ -700,22 +706,22 @@
self.assertEquals(other_entity,
invoice_transaction_movement.getDestinationDecisionValue())
- order_line.setSourceProjectValue(other_entity)
+ order_line.setSourceProjectValue(other_project)
transaction.commit()
self.tic()
self.assertEquals(3, len(invoice_transaction_applied_rule))
invoice_transaction_movement = getIncomeSimulationMovement(
invoice_transaction_applied_rule)
- self.assertEquals(other_entity,
+ self.assertEquals(other_project,
invoice_transaction_movement.getSourceProjectValue())
- order_line.setDestinationProjectValue(other_entity)
+ order_line.setDestinationProjectValue(other_project)
transaction.commit()
self.tic()
self.assertEquals(3, len(invoice_transaction_applied_rule))
invoice_transaction_movement = getIncomeSimulationMovement(
invoice_transaction_applied_rule)
- self.assertEquals(other_entity,
+ self.assertEquals(other_project,
invoice_transaction_movement.getDestinationProjectValue())
order_line.setSourceFunctionValue(other_entity)
More information about the Erp5-report
mailing list