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
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
Iliya Manolov
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
Show 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):
return
(
'erp5_base'
,
'erp5_core_component'
)
def
afterSetUp
(
self
):
def
login
(
self
,
user_name
=
'ERP5TypeTestCase'
,
quiet
=
0
):
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
=
[
'ERP5TypeTestCase'
]
dummy_developer_config
.
developer_list
=
[
user_name
]
getConfiguration
().
product_config
=
{
'erp5'
:
dummy_developer_config
}
elif
'ERP5TypeTestCase'
not
in
product_config
[
'erp5'
].
developer_list
:
product_config
[
'erp5'
].
developer_list
.
append
(
'ERP5TypeTestCase'
)
elif
user_name
not
in
product_config
[
'erp5'
].
developer_list
:
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
.
_module
=
__import__
(
self
.
_getComponentModuleName
(),
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