Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
slapos.core
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
Titouan Soulard
slapos.core
Commits
51d10c04
Commit
51d10c04
authored
Feb 06, 2024
by
Romain Courteaud
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
slapos_erp5: test: 2 roles are expected to be without group
parent
d67d87f6
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
2 deletions
+11
-2
master/bt5/slapos_erp5/TestTemplateItem/portal_components/test.erp5.testSlapOSERP5GroupRoleSecurity.py
...l_components/test.erp5.testSlapOSERP5GroupRoleSecurity.py
+11
-2
No files found.
master/bt5/slapos_erp5/TestTemplateItem/portal_components/test.erp5.testSlapOSERP5GroupRoleSecurity.py
View file @
51d10c04
...
@@ -50,11 +50,20 @@ class TestSlapOSGroupRoleSecurityCoverage(SlapOSTestCaseMixinWithAbort):
...
@@ -50,11 +50,20 @@ class TestSlapOSGroupRoleSecurityCoverage(SlapOSTestCaseMixinWithAbort):
XXX how to check the consistency
XXX how to check the consistency
"""
"""
test_list
=
[]
test_list
=
[]
expected_failure_dict
=
{
# comes from generic erp5 bt5. Unused
'Query - Acquired Assignee'
:
None
,
# Like 'user' group, but for instance
# there is no local_role_group for single instance user
'Slave Instance - Software Instance which provides this Slave Instance'
:
None
}
for
pt
in
self
.
portal
.
portal_types
.
objectValues
():
for
pt
in
self
.
portal
.
portal_types
.
objectValues
():
for
role_information
in
pt
.
contentValues
(
portal_type
=
"Role Information"
):
for
role_information
in
pt
.
contentValues
(
portal_type
=
"Role Information"
):
group
=
role_information
.
getLocalRoleGroupValue
()
group
=
role_information
.
getLocalRoleGroupValue
()
if
group
is
None
:
role_title
=
'%s - %s'
%
(
pt
.
getId
(),
role_information
.
getTitle
())
test_list
.
append
(
'%s - %s'
%
(
pt
.
getId
(),
role_information
.
getTitle
()))
if
((
group
is
None
)
and
(
role_title
not
in
expected_failure_dict
))
or
\
((
group
is
not
None
)
and
(
role_title
in
expected_failure_dict
)):
test_list
.
append
(
role_title
)
test_list
.
sort
()
test_list
.
sort
()
self
.
assertEqual
(
test_list
,
[])
self
.
assertEqual
(
test_list
,
[])
...
...
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