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
367e9a04
Commit
367e9a04
authored
Apr 03, 2002
by
Shane Hathaway
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Used failUnlessRaises() to clean up a little code.
parent
ccd4d15e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
9 deletions
+3
-9
lib/python/AccessControl/tests/testSecurity.py
lib/python/AccessControl/tests/testSecurity.py
+3
-9
No files found.
lib/python/AccessControl/tests/testSecurity.py
View file @
367e9a04
...
...
@@ -13,8 +13,8 @@
"""Document Template Tests
"""
__rcs_id__
=
'$Id: testSecurity.py,v 1.
8 2001/11/28 15:50:52 matt
Exp $'
__version__
=
'$Revision: 1.
8
$'
[
11
:
-
2
]
__rcs_id__
=
'$Id: testSecurity.py,v 1.
9 2002/04/03 20:59:49 shane
Exp $'
__version__
=
'$Revision: 1.
9
$'
[
11
:
-
2
]
import
os
,
sys
,
unittest
...
...
@@ -56,13 +56,7 @@ class SecurityTests (DTMLTests):
return
"This is a protected operation of public object"
html
=
self
.
doc_class
(
'<dtml-var expr="myinst.somemethod()">'
)
try
:
html
(
myinst
=
myclass
())
except
Unauthorized
:
# Passed the test.
pass
else
:
assert
0
,
'Did not deny attribute access'
self
.
failUnlessRaises
(
Unauthorized
,
html
,
myinst
=
myclass
())
def
testSecurityInSyntax
(
self
):
'''
...
...
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