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
import
unittest
from
AccessControl
import
Unauthorized
from
AccessControl
import
Unauthorized
from
Products.PythonScripts.PythonScript
import
manage_addPythonScript
def
addPythonScript
(
folder
,
id
,
params
=
''
,
body
=
''
):
def
addPythonScript
(
folder
,
id
,
params
=
''
,
body
=
''
):
"""Add a PythonScript to folder."""
"""Add a PythonScript to folder."""
from
Products.PythonScripts.PythonScript
import
manage_addPythonScript
# clean up any 'ps' that's already here..
# clean up any 'ps' that's already here..
if
id
in
folder
:
if
id
in
folder
:
del
folder
[
id
]
del
folder
[
id
]
...
@@ -179,9 +179,14 @@ def test_view_restricted_code():
...
@@ -179,9 +179,14 @@ def test_view_restricted_code():
def
test_suite
():
def
test_suite
():
suite
=
unittest
.
TestSuite
()
try
:
import
Products.PythonScripts
except
ImportError
:
pass
else
:
from
Testing.ZopeTestCase
import
ZopeDocTestSuite
from
Testing.ZopeTestCase
import
ZopeDocTestSuite
from
Testing.ZopeTestCase
import
installProduct
from
Testing.ZopeTestCase
import
installProduct
installProduct
(
'PythonScripts'
)
installProduct
(
'PythonScripts'
)
return
unittest
.
TestSuite
((
suite
.
addTest
(
unittest
.
makeSuite
(
ZopeDocTestSuite
()))
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