Commit 173c22a0 authored by Jérome Perrin's avatar Jérome Perrin

When testing that validation is refused with something else that a Currency as...

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



git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@18380 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 2b339152
......@@ -2166,7 +2166,8 @@ class TestAccounting(ERP5TypeTestCase):
'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 @@ class TestAccounting(ERP5TypeTestCase):
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')
......
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