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
Amer
erp5
Commits
23b7eb8a
Commit
23b7eb8a
authored
Feb 29, 2012
by
Arnaud Fontaine
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
For Components tests, override login() to add Developer Role rather than hardcoding the user name.
parent
e48a89dc
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
4 deletions
+7
-4
product/ERP5Type/tests/testDynamicClassGeneration.py
product/ERP5Type/tests/testDynamicClassGeneration.py
+7
-4
No files found.
product/ERP5Type/tests/testDynamicClassGeneration.py
View file @
23b7eb8a
...
@@ -1235,19 +1235,22 @@ class _TestZodbComponent(SecurityTestCase):
...
@@ -1235,19 +1235,22 @@ class _TestZodbComponent(SecurityTestCase):
return
(
'erp5_base'
,
return
(
'erp5_base'
,
'erp5_core_component'
)
'erp5_core_component'
)
def
afterSetUp
(
self
):
def
login
(
self
,
user_name
=
'ERP5TypeTestCase'
,
quiet
=
0
):
product_config
=
getattr
(
getConfiguration
(),
'product_config'
,
None
)
product_config
=
getattr
(
getConfiguration
(),
'product_config'
,
None
)
if
product_config
is
None
:
if
product_config
is
None
:
class
DummyDeveloperConfig
(
object
):
class
DummyDeveloperConfig
(
object
):
pass
pass
dummy_developer_config
=
DummyDeveloperConfig
()
dummy_developer_config
=
DummyDeveloperConfig
()
dummy_developer_config
.
developer_list
=
[
'ERP5TypeTestCase'
]
dummy_developer_config
.
developer_list
=
[
user_name
]
getConfiguration
().
product_config
=
{
'erp5'
:
dummy_developer_config
}
getConfiguration
().
product_config
=
{
'erp5'
:
dummy_developer_config
}
elif
'ERP5TypeTestCase'
not
in
product_config
[
'erp5'
].
developer_list
:
elif
user_name
not
in
product_config
[
'erp5'
].
developer_list
:
product_config
[
'erp5'
].
developer_list
.
append
(
'ERP5TypeTestCase'
)
product_config
[
'erp5'
].
developer_list
.
append
(
user_name
)
return
super
(
_TestZodbComponent
,
self
).
login
(
user_name
,
quiet
)
def
afterSetUp
(
self
):
self
.
_component_tool
=
self
.
getPortal
().
portal_components
self
.
_component_tool
=
self
.
getPortal
().
portal_components
self
.
_module
=
__import__
(
self
.
_getComponentModuleName
(),
self
.
_module
=
__import__
(
self
.
_getComponentModuleName
(),
fromlist
=
[
'erp5.component'
])
fromlist
=
[
'erp5.component'
])
...
...
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