[Erp5-report] r18380 - /erp5/trunk/products/ERP5/tests/testAccounting.py
nobody at svn.erp5.org
nobody at svn.erp5.org
Tue Dec 18 10:38:22 CET 2007
Author: jerome
Date: Tue Dec 18 10:38:21 2007
New Revision: 18380
URL: http://svn.erp5.org?rev=18380&view=rev
Log:
When testing that validation is refused with something else that a Currency as a resource, at least use a Resource type
Don't check_consistency when creating invalid transactions
Modified:
erp5/trunk/products/ERP5/tests/testAccounting.py
Modified: erp5/trunk/products/ERP5/tests/testAccounting.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/tests/testAccounting.py?rev=18380&r1=18379&r2=18380&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/tests/testAccounting.py (original)
+++ erp5/trunk/products/ERP5/tests/testAccounting.py Tue Dec 18 10:38:21 2007
@@ -2166,7 +2166,8 @@
'stop_action')
# setting a dummy relationship is not enough, resource must be a
# currency
- transaction.setResource(transaction.getDestinationSection())
+ transaction.setResourceValue(
+ self.portal.product_module.newContent(portal_type='Product'))
self.assertRaises(ValidationFailed,
self.getWorkflowTool().doActionFor,
transaction,
@@ -2568,11 +2569,13 @@
category = self.vendor.getGroupValue()
self.assertNotEquals(category, None)
transaction = self.createAccountingTransaction(
- source_section_value=category)
+ source_section_value=category,
+ check_consistency=0)
self.assertRaises(ValidationFailed, self.getWorkflowTool().doActionFor,
transaction, 'stop_action')
transaction = self.createAccountingTransaction(
- destination_section_value=category)
+ destination_section_value=category,
+ check_consistency=0)
self.assertRaises(ValidationFailed, self.getWorkflowTool().doActionFor,
transaction, 'stop_action')
More information about the Erp5-report
mailing list