[Zope-Checkins] CVS: Zope2 - testSecurity.py:1.3
shane@digicool.com
shane@digicool.com
Thu, 21 Jun 2001 13:21:09 -0400 (EDT)
Update of /cvs-repository/Zope2/lib/python/AccessControl/tests
In directory korak.digicool.com:/tmp/cvs-serv24194
Modified Files:
testSecurity.py
Log Message:
Clarified expected behavior of tests.
--- Updated File testSecurity.py in package Zope2 --
--- testSecurity.py 2001/04/27 20:27:38 1.2
+++ testSecurity.py 2001/06/21 17:21:09 1.3
@@ -117,10 +117,11 @@
class person:
name='Jim'
+ doc = self.doc_class(
+ '<dtml-with person>Hi, my name is '
+ '<dtml-var name></dtml-with>')
try:
- res = self.doc_class(
- '<dtml-with person>Hi, my name is '
- '<dtml-var name></dtml-with>')(person=person)
+ doc(person=person)
except Unauthorized:
# Passed the test.
pass
@@ -136,7 +137,7 @@
html = self.doc_class('<dtml-var expr="myinst.somemethod()">')
try:
- res = html(myinst=myclass())
+ html(myinst=myclass())
except Unauthorized:
# Passed the test.
pass
@@ -151,8 +152,8 @@
expr = '<dtml-var expr="(lambda x, _read=(lambda ob:ob): x.y)(c)">'
try:
# This would be a security hole.
- html = self.doc_class(expr)
- html()
+ html = self.doc_class(expr) # It might compile here...
+ html() # or it might compile here.
except SyntaxError:
# Passed the test.
pass