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
Lukas Niegsch
erp5
Commits
4de0a48b
Commit
4de0a48b
authored
Feb 29, 2012
by
Arnaud Fontaine
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
For Components BusinessTemplate tests, the test user must have Developer Role.
parent
23b7eb8a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
0 deletions
+19
-0
product/ERP5/tests/testBusinessTemplate.py
product/ERP5/tests/testBusinessTemplate.py
+19
-0
No files found.
product/ERP5/tests/testBusinessTemplate.py
View file @
4de0a48b
...
@@ -6870,6 +6870,25 @@ class TestDocumentTemplateItem(BusinessTemplateMixin):
...
@@ -6870,6 +6870,25 @@ class TestDocumentTemplateItem(BusinessTemplateMixin):
component_module
=
DocumentComponent
.
_getDynamicModuleNamespace
()
component_module
=
DocumentComponent
.
_getDynamicModuleNamespace
()
component_portal_type
=
DocumentComponent
.
portal_type
component_portal_type
=
DocumentComponent
.
portal_type
def
login
(
self
,
user_name
=
'ERP5TypeTestCase'
,
quiet
=
0
):
"""
XXX-arnau: Copy/paste from testDynamicClassGeneration
"""
from
App.config
import
getConfiguration
product_config
=
getattr
(
getConfiguration
(),
'product_config'
,
None
)
if
product_config
is
None
:
class
DummyDeveloperConfig
(
object
):
pass
dummy_developer_config
=
DummyDeveloperConfig
()
dummy_developer_config
.
developer_list
=
[
user_name
]
getConfiguration
().
product_config
=
{
'erp5'
:
dummy_developer_config
}
elif
user_name
not
in
product_config
[
'erp5'
].
developer_list
:
product_config
[
'erp5'
].
developer_list
.
append
(
user_name
)
return
super
(
TestDocumentTemplateItem
,
self
).
login
(
user_name
,
quiet
)
def
stepCreateZodbDocument
(
self
,
sequence
=
None
,
**
kw
):
def
stepCreateZodbDocument
(
self
,
sequence
=
None
,
**
kw
):
document_id
=
'%s.erp5.%s'
%
(
self
.
component_module
,
self
.
document_title
)
document_id
=
'%s.erp5.%s'
%
(
self
.
component_module
,
self
.
document_title
)
self
.
getPortalObject
().
portal_components
.
newContent
(
self
.
getPortalObject
().
portal_components
.
newContent
(
...
...
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