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
7a14524a
Commit
7a14524a
authored
Jun 13, 2010
by
Hanno Schlichting
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Got rid of PythonScripts test dependency in DocumentTemplate
parent
a61b86e2
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
7 deletions
+17
-7
AC-vs-DTML-TODO.txt
AC-vs-DTML-TODO.txt
+0
-4
src/DocumentTemplate/tests/testSecurity.py
src/DocumentTemplate/tests/testSecurity.py
+17
-3
No files found.
AC-vs-DTML-TODO.txt
View file @
7a14524a
...
...
@@ -54,7 +54,3 @@ DocumentTemplate
configuration via zope.conf. The calls are localized to one function each.
Add an optional dependency on Zope2? Configure if it is available,
otherwise use some default?
- Test only dependencies:
* Products.PythonScripts
src/DocumentTemplate/tests/testSecurity.py
View file @
7a14524a
...
...
@@ -17,15 +17,29 @@ import unittest
from
DocumentTemplate
import
HTML
from
DocumentTemplate.tests.testDTML
import
DTMLTests
from
Products.PythonScripts.standard
import
DTML
from
DocumentTemplate.security
import
Restricted
DTML
from
AccessControl
import
Unauthorized
from
AccessControl.SecurityManagement
import
getSecurityManager
from
ExtensionClass
import
Base
class
UnownedDTML
(
DTML
):
class
UnownedDTML
(
RestrictedDTML
,
HTML
):
def
getOwner
(
self
):
return
None
class
SecurityTests
(
DTMLTests
):
def
__call__
(
self
,
client
=
None
,
REQUEST
=
{},
RESPONSE
=
None
,
**
kw
):
"""Render the DTML"""
security
=
getSecurityManager
()
security
.
addContext
(
self
)
try
:
return
HTML
.
__call__
(
self
,
client
,
REQUEST
,
**
kw
)
finally
:
security
.
removeContext
(
self
)
class
SecurityTests
(
DTMLTests
):
doc_class
=
UnownedDTML
unrestricted_doc_class
=
HTML
...
...
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