Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
W
wendelin
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
Rafael Monnerat
wendelin
Commits
ed1a301f
Commit
ed1a301f
authored
Jun 15, 2022
by
Levin Zimmermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
erp5_wendelin: Add test for Index*Sequence in restricted python
parent
9bd40b48
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
2 deletions
+18
-2
bt5/erp5_wendelin/TestTemplateItem/portal_components/test.erp5.testWendelin.py
...tTemplateItem/portal_components/test.erp5.testWendelin.py
+18
-2
No files found.
bt5/erp5_wendelin/TestTemplateItem/portal_components/test.erp5.testWendelin.py
View file @
ed1a301f
...
@@ -59,7 +59,7 @@ class Test(ERP5TypeTestCase):
...
@@ -59,7 +59,7 @@ class Test(ERP5TypeTestCase):
def
getTitle
(
self
):
def
getTitle
(
self
):
return
"Wendelin Test"
return
"Wendelin Test"
def
createAndRunScript
(
self
,
code
,
expected
):
def
createAndRunScript
(
self
,
code
,
expected
=
None
):
# we do not care the script name for security test thus use uuid1
# we do not care the script name for security test thus use uuid1
name
=
str
(
uuid
.
uuid1
())
name
=
str
(
uuid
.
uuid1
())
script_container
=
self
.
portal
.
portal_skins
.
custom
script_container
=
self
.
portal
.
portal_skins
.
custom
...
@@ -603,3 +603,19 @@ return result
...
@@ -603,3 +603,19 @@ return result
"""
.
format
(
ingestion_policy_id
)
"""
.
format
(
ingestion_policy_id
)
self
.
createAndRunScript
(
code
,
[
98
,
34
,
[
1
,
2
,
3
],
34
])
self
.
createAndRunScript
(
code
,
[
98
,
34
,
[
1
,
2
,
3
],
34
])
def
test_14_IndexSequenceInRestrictedPython
(
self
):
"""
Ensure its possible to iterate over return values of DataBucketStream methods
in restricted python.
"""
code
=
r"""
data_bucket_stream = context.portal_catalog.data_stream_module.newContent(
portal_type='Data Bucket Stream'
)
data_bucket_stream.insertBucket(1, "1" * 100000)
result = [x for x in data_bucket_stream.getBucketIndexKeySequenceByIndex()]
"""
self
.
createAndRunScript
(
code
)
\ No newline at end of file
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