Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Z
Zope
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
Kirill Smelkov
Zope
Commits
f23cee5b
Commit
f23cee5b
authored
Jul 10, 2010
by
Hanno Schlichting
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Made the tests conditional on the presence of PythonScripts
parent
7b17b903
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
7 deletions
+12
-7
src/Products/Five/browser/tests/test_scriptsecurity.py
src/Products/Five/browser/tests/test_scriptsecurity.py
+12
-7
No files found.
src/Products/Five/browser/tests/test_scriptsecurity.py
View file @
f23cee5b
import
unittest
from
AccessControl
import
Unauthorized
from
Products.PythonScripts.PythonScript
import
manage_addPythonScript
def
addPythonScript
(
folder
,
id
,
params
=
''
,
body
=
''
):
"""Add a PythonScript to folder."""
from
Products.PythonScripts.PythonScript
import
manage_addPythonScript
# clean up any 'ps' that's already here..
if
id
in
folder
:
del
folder
[
id
]
...
...
@@ -179,9 +179,14 @@ def test_view_restricted_code():
def
test_suite
():
suite
=
unittest
.
TestSuite
()
try
:
import
Products.PythonScripts
except
ImportError
:
pass
else
:
from
Testing.ZopeTestCase
import
ZopeDocTestSuite
from
Testing.ZopeTestCase
import
installProduct
installProduct
(
'PythonScripts'
)
return
unittest
.
TestSuite
((
ZopeDocTestSuite
(),
))
suite
.
addTest
(
unittest
.
makeSuite
(
ZopeDocTestSuite
()))
return
suite
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