[Erp5-report] r35602 jerome - /erp5/trunk/products/ERP5/tests/testAccounting.py
nobody at svn.erp5.org
nobody at svn.erp5.org
Tue May 25 10:10:18 CEST 2010
Author: jerome
Date: Tue May 25 10:10:17 2010
New Revision: 35602
URL: http://svn.erp5.org?rev=35602&view=rev
Log:
use the allowed types in the module, not all accounting transaction types
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=35602&r1=35601&r2=35602&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/tests/testAccounting.py [utf8] (original)
+++ erp5/trunk/products/ERP5/tests/testAccounting.py [utf8] Tue May 25 10:10:17 2010
@@ -2478,11 +2478,7 @@
# tests for Grouping References
def test_GroupingReferenceResetedOnCopyPaste(self):
accounting_module = self.portal.accounting_module
- for portal_type in self.portal.getPortalAccountingTransactionTypeList():
- if portal_type == 'Balance Transaction':
- # Balance Transaction cannot be copy and pasted, because they are not
- # in visible allowed types.
- continue
+ for portal_type in accounting_module.getVisibleAllowedContentTypeList():
accounting_transaction = accounting_module.newContent(
portal_type=portal_type)
line = accounting_transaction.newContent(
@@ -3444,10 +3440,9 @@
len(portal.getPortalAccountingMovementTypeList()), 0)
self.assertNotEquals(
len(portal.getPortalAccountingTransactionTypeList()), 0)
- for accounting_portal_type in portal\
- .getPortalAccountingTransactionTypeList():
+ for accounting_portal_type in accounting_module.allowedContentTypes():
accounting_transaction = accounting_module.newContent(
- portal_type = accounting_portal_type,
+ portal_type = accounting_portal_type.getId(),
source_section_value = source_section_value,
destination_section_value = destination_section_value,
resource_value = resource_value )
More information about the Erp5-report
mailing list