Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5
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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Xavier Thompson
erp5
Commits
49b9612b
Commit
49b9612b
authored
Oct 27, 2020
by
Kazuhiko Shiozaki
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
test: set preference owner for accounting tests.
parent
11892e1d
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
28 additions
and
0 deletions
+28
-0
bt5/erp5_accounting/TestTemplateItem/portal_components/test.erp5.testAccountingReports.py
...Item/portal_components/test.erp5.testAccountingReports.py
+8
-0
bt5/erp5_accounting_renderjs_ui_test/TestTemplateItem/portal_components/test.erp5.testFunctionalRJSAccountingReport.py
...components/test.erp5.testFunctionalRJSAccountingReport.py
+9
-0
product/ERP5Type/tests/testFunctionalCore.py
product/ERP5Type/tests/testFunctionalCore.py
+11
-0
No files found.
bt5/erp5_accounting/TestTemplateItem/portal_components/test.erp5.testAccountingReports.py
View file @
49b9612b
...
@@ -31,6 +31,7 @@
...
@@ -31,6 +31,7 @@
import
unittest
import
unittest
from
AccessControl
import
getSecurityManager
from
DateTime
import
DateTime
from
DateTime
import
DateTime
from
erp5.component.test.testAccounting
import
AccountingTestCase
from
erp5.component.test.testAccounting
import
AccountingTestCase
...
@@ -5119,6 +5120,13 @@ class TestAccountingReportsWithAnalytic(AccountingTestCase, ERP5ReportTestCase):
...
@@ -5119,6 +5120,13 @@ class TestAccountingReportsWithAnalytic(AccountingTestCase, ERP5ReportTestCase):
def
afterSetUp
(
self
):
def
afterSetUp
(
self
):
AccountingTestCase
.
afterSetUp
(
self
)
AccountingTestCase
.
afterSetUp
(
self
)
self
.
login
()
self
.
login
()
# change ownership of the preference
self
.
portal
.
portal_preferences
.
accounting_zuite_preference
.
changeOwnership
(
getSecurityManager
().
getUser
(),
True
,
)
# create some functions
# create some functions
function
=
self
.
portal
.
portal_categories
.
function
function
=
self
.
portal
.
portal_categories
.
function
if
function
.
_getOb
(
'a'
,
None
)
is
None
:
if
function
.
_getOb
(
'a'
,
None
)
is
None
:
...
...
bt5/erp5_accounting_renderjs_ui_test/TestTemplateItem/portal_components/test.erp5.testFunctionalRJSAccountingReport.py
View file @
49b9612b
...
@@ -28,12 +28,21 @@
...
@@ -28,12 +28,21 @@
##############################################################################
##############################################################################
import
unittest
import
unittest
from
AccessControl
import
getSecurityManager
from
Products.ERP5Type.tests.ERP5TypeFunctionalTestCase
import
ERP5TypeFunctionalTestCase
from
Products.ERP5Type.tests.ERP5TypeFunctionalTestCase
import
ERP5TypeFunctionalTestCase
class
TestRenderJSAccountingReport
(
ERP5TypeFunctionalTestCase
):
class
TestRenderJSAccountingReport
(
ERP5TypeFunctionalTestCase
):
foreground
=
0
foreground
=
0
run_only
=
"renderjs_ui_accounting_report_zuite"
run_only
=
"renderjs_ui_accounting_report_zuite"
def
afterSetUp
(
self
):
# change ownership of the preference
self
.
portal
.
portal_preferences
.
accounting_zuite_preference
.
changeOwnership
(
getSecurityManager
().
getUser
(),
True
,
)
super
(
TestRenderJSAccountingReport
,
self
).
afterSetUp
()
def
getBusinessTemplateList
(
self
):
def
getBusinessTemplateList
(
self
):
return
(
return
(
'erp5_accounting_renderjs_ui_test'
,
'erp5_accounting_renderjs_ui_test'
,
...
...
product/ERP5Type/tests/testFunctionalCore.py
View file @
49b9612b
...
@@ -29,12 +29,23 @@
...
@@ -29,12 +29,23 @@
import
unittest
import
unittest
from
AccessControl
import
getSecurityManager
from
Products.ERP5Type.tests.ERP5TypeFunctionalTestCase
import
\
from
Products.ERP5Type.tests.ERP5TypeFunctionalTestCase
import
\
ERP5TypeFunctionalTestCase
ERP5TypeFunctionalTestCase
class
TestZeleniumCore
(
ERP5TypeFunctionalTestCase
):
class
TestZeleniumCore
(
ERP5TypeFunctionalTestCase
):
foreground
=
0
foreground
=
0
def
afterSetUp
(
self
):
# change ownership of the preference
pref
=
self
.
portal
.
portal_preferences
.
_getOb
(
'accounting_zuite_preference'
,
None
,
)
if
pref
is
not
None
:
pref
.
changeOwnership
(
getSecurityManager
().
getUser
(),
True
)
super
(
TestZeleniumCore
,
self
).
afterSetUp
()
def
getBusinessTemplateList
(
self
):
def
getBusinessTemplateList
(
self
):
"""
"""
Return the list of business templates.
Return the list of business templates.
...
...
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