Commit 637ab568 authored by Tomáš Peterka's avatar Tomáš Peterka

[accounting_ui_test] Revert independence of tests because they do not work independently

parent 1a400b57
......@@ -13,6 +13,15 @@ business_process = portal.portal_catalog.getResultValue(
'erp5_default_business_process'), # erp5_simulation_test
portal_type='Business Process').getRelativeUrl()
# if the previous test didn't change input data, no need to recreate content
current_script_data_id = '%s_month_count_%s_draft_%s_state_%s_payment_%s_leger_%s' % (
month_count, add_draft_transactions, transaction_state,
add_related_payments, set_ledger, script.getId())
if accounting_module.getProperty('current_content_script',
'') == current_script_data_id:
return "Accounting Transactions Created."
# first, cleanup accounting module
# XXX should be done in an external script / tool, because we have to
# workaround some security checks
......@@ -271,6 +280,9 @@ if add_draft_transactions:
source=getAccountByTitle('Goods Sales'),
quantity=random.randint(300, 400),)
accounting_module.setProperty('current_content_script',
current_script_data_id)
# test depends on this
return "Accounting Transactions Created."
# vim: syntax=python
......@@ -10,6 +10,13 @@ year = 2005
total_receivable_quantity = 0
# if the previous test didn't change input data, no need to recreate content
current_script_data_id = '%s_month_count_%s' % (
month_count, script.getId())
if accounting_module.getProperty('current_content_script',
'') == current_script_data_id:
return "Accounting Transactions Created."
# first, cleanup accounting module
# XXX should be done in an external script / tool, because we have to
# workaround some security checks
......@@ -120,6 +127,10 @@ for month in range(1, month_count + 1):
'immediateReindexObject')),
).AccountingTransactionLine_resetGroupingReference()
accounting_module.setProperty('current_content_script',
current_script_data_id)
# test depends on this
return "Accounting Transactions Created."
# vim: syntax=python
......@@ -7,6 +7,13 @@ from DateTime import DateTime
from Products.ZSQLCatalog.SQLCatalog import SimpleQuery
year = 2005
# if the previous test didn't change input data, no need to recreate content
current_script_data_id = '%s_month_count_%s' % (
month_count, script.getId())
if accounting_module.getProperty('current_content_script',
'') == current_script_data_id:
return "Accounting Transactions Created."
# first, cleanup accounting module
# XXX should be done in an external script / tool, because we have to
......@@ -92,6 +99,8 @@ for month in range(1, month_count + 1):
tr.setSourceReference('source_reference')
tr.setDestinationReference('destination_reference')
accounting_module.setProperty('current_content_script',
current_script_data_id)
# test depends on this
return "Accounting Transactions Created."
......
......@@ -3,5 +3,7 @@ module = portal.accounting_module
module.manage_delObjects(list(module.objectIds()))
module.setProperty('current_content_script', script.getId())
# test depends on this
return "Accounting Transactions Created."
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