diff --git a/product/ERP5/tests/testAccounting.py b/product/ERP5/tests/testAccounting.py index cab8cf94ff7c8cc35be14d833b4e2e0ddebe4236..3277b443877f2e11f6ae21a315122932ba3e6fa3 100644 --- a/product/ERP5/tests/testAccounting.py +++ b/product/ERP5/tests/testAccounting.py @@ -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')