[Zope-Checkins] SVN: Zope/branches/five-integration/lib/python/OFS/tests/testCopySupport.py Forward-port test fix from 2.7 branch.

Tres Seaver tseaver at zope.com
Mon Mar 21 14:16:46 EST 2005


Log message for revision 29620:
  Forward-port test fix from 2.7 branch.

Changed:
  U   Zope/branches/five-integration/lib/python/OFS/tests/testCopySupport.py

-=-
Modified: Zope/branches/five-integration/lib/python/OFS/tests/testCopySupport.py
===================================================================
--- Zope/branches/five-integration/lib/python/OFS/tests/testCopySupport.py	2005-03-21 17:31:00 UTC (rev 29619)
+++ Zope/branches/five-integration/lib/python/OFS/tests/testCopySupport.py	2005-03-21 19:16:46 UTC (rev 29620)
@@ -281,8 +281,13 @@
         self._lambdas = ( validate_lambda, checkPermission_lambda )
 
     def validate( self, *args, **kw ):
-        return self._lambdas[ 0 ]( *args, **kw )
+        from zExceptions import Unauthorized
 
+        allowed = self._lambdas[ 0 ]( *args, **kw )
+        if not allowed:
+            raise Unauthorized
+        return 1
+
     def checkPermission( self, *args, **kw ) :
         return self._lambdas[ 1 ]( *args, **kw )
 



More information about the Zope-Checkins mailing list