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
58712c56
Commit
58712c56
authored
Oct 17, 2001
by
Shane Hathaway
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added a test that checks access to aq_* names and fixed the implicit access
test.
parent
9372d0d8
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
3 deletions
+11
-3
lib/python/AccessControl/tests/testSecurity.py
lib/python/AccessControl/tests/testSecurity.py
+11
-3
No files found.
lib/python/AccessControl/tests/testSecurity.py
View file @
58712c56
...
...
@@ -85,8 +85,8 @@
"""Document Template Tests
"""
__rcs_id__
=
'$Id: testSecurity.py,v 1.
5 2001/10/17 20:00:32 tseaver
Exp $'
__version__
=
'$Revision: 1.
5
$'
[
11
:
-
2
]
__rcs_id__
=
'$Id: testSecurity.py,v 1.
6 2001/10/17 21:06:17 shane
Exp $'
__version__
=
'$Revision: 1.
6
$'
[
11
:
-
2
]
import
os
,
sys
,
unittest
...
...
@@ -113,7 +113,7 @@ class SecurityTests (DTMLTests):
'<dtml-with person>Hi, my name is '
'<dtml-var name></dtml-with>'
)
try
:
doc
(
person
=
person
)
doc
(
person
=
person
()
)
except
Unauthorized
:
# Passed the test.
pass
...
...
@@ -158,6 +158,14 @@ class SecurityTests (DTMLTests):
res
=
html
(
c
=
c
)
assert
res
==
'10'
,
res
def
testAqNames
(
self
):
from
AccessControl.ZopeSecurityPolicy
import
ZopeSecurityPolicy
policy
=
ZopeSecurityPolicy
()
assert
not
policy
.
validate
(
''
,
''
,
'aq_self'
,
''
,
None
)
assert
not
policy
.
validate
(
''
,
''
,
'aq_base'
,
''
,
None
)
assert
policy
.
validate
(
''
,
''
,
'aq_parent'
,
''
,
None
)
assert
policy
.
validate
(
''
,
''
,
'aq_explicit'
,
''
,
None
)
# Note: we need more tests!
def
test_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