[Zope-Checkins] CVS: Packages/OFS/tests -
testCopySupport.py:1.7.64.2.10.1
Jim Fulton
jim at zope.com
Mon Feb 14 14:23:05 EST 2005
Update of /cvs-repository/Packages/OFS/tests
In directory cvs.zope.org:/tmp/cvs-serv20569/lib/python/OFS/tests
Modified Files:
Tag: shh-aqtests-branch
testCopySupport.py
Log Message:
Fixed a test bug that created a security policy that
returned a false value, when it should have
raised Unauthorized.
=== Packages/OFS/tests/testCopySupport.py 1.7.64.2 => 1.7.64.2.10.1 ===
--- Packages/OFS/tests/testCopySupport.py:1.7.64.2 Fri Nov 26 09:58:54 2004
+++ Packages/OFS/tests/testCopySupport.py Mon Feb 14 14:23:04 2005
@@ -3,7 +3,7 @@
from mimetools import Message
from multifile import MultiFile
-from AccessControl import SecurityManager
+from AccessControl import SecurityManager, Unauthorized
from AccessControl.SecurityManagement import newSecurityManager
from AccessControl.SecurityManagement import noSecurityManager
from Acquisition import Implicit
@@ -280,7 +280,9 @@
self._lambdas = ( validate_lambda, checkPermission_lambda )
def validate( self, *args, **kw ):
- return self._lambdas[ 0 ]( *args, **kw )
+ if self._lambdas[ 0 ]( *args, **kw ):
+ return 1
+ raise Unauthorized
def checkPermission( self, *args, **kw ) :
return self._lambdas[ 1 ]( *args, **kw )
More information about the Zope-Checkins
mailing list