Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
E
erp5_rtl_support
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Romain Courteaud
erp5_rtl_support
Commits
22a97a18
Commit
22a97a18
authored
Oct 31, 2017
by
Tomáš Peterka
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[accounting_ui_test] Tests are independent
parent
38ba0fc7
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
3 additions
and
34 deletions
+3
-34
bt5/erp5_accounting_ui_test/SkinTemplateItem/portal_skins/erp5_accounting_ui_test/AccountingZuite_createAccountingTransactionList.py
...i_test/AccountingZuite_createAccountingTransactionList.py
+0
-12
bt5/erp5_accounting_ui_test/SkinTemplateItem/portal_skins/erp5_accounting_ui_test/AccountingZuite_createAccountingTransactionListSalesAndPayments.py
...gZuite_createAccountingTransactionListSalesAndPayments.py
+0
-11
bt5/erp5_accounting_ui_test/SkinTemplateItem/portal_skins/erp5_accounting_ui_test/AccountingZuite_createAccountingTransactionListWithPersons.py
...untingZuite_createAccountingTransactionListWithPersons.py
+0
-9
bt5/erp5_accounting_ui_test/SkinTemplateItem/portal_skins/erp5_accounting_ui_test/AccountingZuite_initializeAccountingTransactionTemplateTest.py
...ntingZuite_initializeAccountingTransactionTemplateTest.py
+0
-2
bt5/erp5_accounting_ui_test/SkinTemplateItem/portal_skins/erp5_accounting_ui_test/AccountingZuite_markChanged.py
...ns/erp5_accounting_ui_test/AccountingZuite_markChanged.py
+3
-0
No files found.
bt5/erp5_accounting_ui_test/SkinTemplateItem/portal_skins/erp5_accounting_ui_test/AccountingZuite_createAccountingTransactionList.py
View file @
22a97a18
...
@@ -13,15 +13,6 @@ business_process = portal.portal_catalog.getResultValue(
...
@@ -13,15 +13,6 @@ business_process = portal.portal_catalog.getResultValue(
'erp5_default_business_process'
),
# erp5_simulation_test
'erp5_default_business_process'
),
# erp5_simulation_test
portal_type
=
'Business Process'
).
getRelativeUrl
()
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
# first, cleanup accounting module
# XXX should be done in an external script / tool, because we have to
# XXX should be done in an external script / tool, because we have to
# workaround some security checks
# workaround some security checks
...
@@ -280,9 +271,6 @@ if add_draft_transactions:
...
@@ -280,9 +271,6 @@ if add_draft_transactions:
source
=
getAccountByTitle
(
'Goods Sales'
),
source
=
getAccountByTitle
(
'Goods Sales'
),
quantity
=
random
.
randint
(
300
,
400
),)
quantity
=
random
.
randint
(
300
,
400
),)
accounting_module
.
setProperty
(
'current_content_script'
,
current_script_data_id
)
# test depends on this
# test depends on this
return
"Accounting Transactions Created."
return
"Accounting Transactions Created."
# vim: syntax=python
# vim: syntax=python
bt5/erp5_accounting_ui_test/SkinTemplateItem/portal_skins/erp5_accounting_ui_test/AccountingZuite_createAccountingTransactionListSalesAndPayments.py
View file @
22a97a18
...
@@ -10,13 +10,6 @@ year = 2005
...
@@ -10,13 +10,6 @@ year = 2005
total_receivable_quantity
=
0
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
# first, cleanup accounting module
# XXX should be done in an external script / tool, because we have to
# XXX should be done in an external script / tool, because we have to
# workaround some security checks
# workaround some security checks
...
@@ -127,10 +120,6 @@ for month in range(1, month_count + 1):
...
@@ -127,10 +120,6 @@ for month in range(1, month_count + 1):
'immediateReindexObject'
)),
'immediateReindexObject'
)),
).
AccountingTransactionLine_resetGroupingReference
()
).
AccountingTransactionLine_resetGroupingReference
()
accounting_module
.
setProperty
(
'current_content_script'
,
current_script_data_id
)
# test depends on this
# test depends on this
return
"Accounting Transactions Created."
return
"Accounting Transactions Created."
# vim: syntax=python
# vim: syntax=python
bt5/erp5_accounting_ui_test/SkinTemplateItem/portal_skins/erp5_accounting_ui_test/AccountingZuite_createAccountingTransactionListWithPersons.py
View file @
22a97a18
...
@@ -7,13 +7,6 @@ from DateTime import DateTime
...
@@ -7,13 +7,6 @@ from DateTime import DateTime
from
Products.ZSQLCatalog.SQLCatalog
import
SimpleQuery
from
Products.ZSQLCatalog.SQLCatalog
import
SimpleQuery
year
=
2005
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
# first, cleanup accounting module
# XXX should be done in an external script / tool, because we have to
# XXX should be done in an external script / tool, because we have to
...
@@ -99,8 +92,6 @@ for month in range(1, month_count + 1):
...
@@ -99,8 +92,6 @@ for month in range(1, month_count + 1):
tr
.
setSourceReference
(
'source_reference'
)
tr
.
setSourceReference
(
'source_reference'
)
tr
.
setDestinationReference
(
'destination_reference'
)
tr
.
setDestinationReference
(
'destination_reference'
)
accounting_module
.
setProperty
(
'current_content_script'
,
current_script_data_id
)
# test depends on this
# test depends on this
return
"Accounting Transactions Created."
return
"Accounting Transactions Created."
...
...
bt5/erp5_accounting_ui_test/SkinTemplateItem/portal_skins/erp5_accounting_ui_test/AccountingZuite_initializeAccountingTransactionTemplateTest.py
View file @
22a97a18
...
@@ -3,7 +3,5 @@ module = portal.accounting_module
...
@@ -3,7 +3,5 @@ module = portal.accounting_module
module
.
manage_delObjects
(
list
(
module
.
objectIds
()))
module
.
manage_delObjects
(
list
(
module
.
objectIds
()))
module
.
setProperty
(
'current_content_script'
,
script
.
getId
())
# test depends on this
# test depends on this
return
"Accounting Transactions Created."
return
"Accounting Transactions Created."
bt5/erp5_accounting_ui_test/SkinTemplateItem/portal_skins/erp5_accounting_ui_test/AccountingZuite_markChanged.py
View file @
22a97a18
"""Change the `current_content_script` property on accounting module,
"""Change the `current_content_script` property on accounting module,
so that the next test knows that we have modified the test data.
so that the next test knows that we have modified the test data.
XXX Kato: This is seriously wrong because test must not suppose anything
about the other tests - especially that they did not modify the data.
"""
"""
context
.
getPortalObject
().
accounting_module
.
setProperty
(
context
.
getPortalObject
().
accounting_module
.
setProperty
(
'current_content_script'
,
'modified'
)
'current_content_script'
,
'modified'
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment