Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5-Boxiang
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
Hamza
erp5-Boxiang
Commits
2c4053c4
Commit
2c4053c4
authored
Nov 03, 2016
by
Kazuhiko Shiozaki
Committed by
Vincent Pelletier
Dec 23, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
test: drop test for obsoleted erp5_users.getUserByLogin().
parent
f2156b03
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
34 deletions
+0
-34
product/ERP5Security/tests/testERP5Security.py
product/ERP5Security/tests/testERP5Security.py
+0
-34
No files found.
product/ERP5Security/tests/testERP5Security.py
View file @
2c4053c4
...
@@ -671,40 +671,6 @@ class TestLocalRoleManagement(ERP5TypeTestCase):
...
@@ -671,40 +671,6 @@ class TestLocalRoleManagement(ERP5TypeTestCase):
self
.
assertFalse
(
'Assignor'
in
self
.
assertFalse
(
'Assignor'
in
getSecurityManager
().
getUser
().
getRolesInContext
(
obj
))
getSecurityManager
().
getUser
().
getRolesInContext
(
obj
))
def
testGetUserByLogin
(
self
):
"""Test getUserByLogin method
"""
self
.
loginAsUser
(
self
.
username
)
# getUserByLogin accept login as a string
self
.
portal
.
portal_caches
.
clearAllCache
()
self
.
commit
()
person_list
=
self
.
portal
.
acl_users
.
erp5_users
.
getUserByLogin
(
self
.
username
)
self
.
assertEqual
(
1
,
len
(
person_list
))
self
.
assertEqual
(
self
.
username
,
person_list
[
0
].
getReference
())
# getUserByLogin accept login as a list
self
.
portal
.
portal_caches
.
clearAllCache
()
self
.
commit
()
person_list
=
self
.
portal
.
acl_users
.
erp5_users
.
getUserByLogin
([
self
.
username
])
self
.
assertEqual
(
1
,
len
(
person_list
))
self
.
assertEqual
(
self
.
username
,
person_list
[
0
].
getReference
())
# getUserByLogin accept login as a tuple
self
.
portal
.
portal_caches
.
clearAllCache
()
self
.
commit
()
person_list
=
self
.
portal
.
acl_users
.
erp5_users
.
getUserByLogin
((
self
.
username
,))
self
.
assertEqual
(
1
,
len
(
person_list
))
self
.
assertEqual
(
self
.
username
,
person_list
[
0
].
getReference
())
# PreferenceTool pass a user as parameter
user
=
getSecurityManager
().
getUser
()
self
.
portal
.
portal_caches
.
clearAllCache
()
self
.
commit
()
person_list
=
self
.
portal
.
acl_users
.
erp5_users
.
getUserByLogin
(
user
)
self
.
assertEqual
(
1
,
len
(
person_list
))
self
.
assertEqual
(
self
.
username
,
person_list
[
0
].
getReference
())
def
testLocalRoleWithTraverser
(
self
):
def
testLocalRoleWithTraverser
(
self
):
"""Make sure that local role works correctly when traversing
"""Make sure that local role works correctly when traversing
"""
"""
...
...
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