[Zope3-checkins] CVS: Zope3/src/zope/app/publisher/browser/tests - test_directives.py:1.24 test_icondirective.py:1.12

Jim Fulton jim at zope.com
Mon Sep 22 18:37:27 EDT 2003


Update of /cvs-repository/Zope3/src/zope/app/publisher/browser/tests
In directory cvs.zope.org:/tmp/cvs-serv31338/src/zope/app/publisher/browser/tests

Modified Files:
	test_directives.py test_icondirective.py 
Log Message:
Resources are no longer security proxied by getResource.  They will be
proxied by the publisher.  The tests need to simulate this by proxying
the result of getResource.


=== Zope3/src/zope/app/publisher/browser/tests/test_directives.py 1.23 => 1.24 ===
--- Zope3/src/zope/app/publisher/browser/tests/test_directives.py:1.23	Sun Aug 17 02:07:35 2003
+++ Zope3/src/zope/app/publisher/browser/tests/test_directives.py	Mon Sep 22 18:37:26 2003
@@ -805,7 +805,7 @@
             """ % path
             ))
 
-        r = getResource(ob, 'index.html', request)
+        r = ProxyFactory(getResource(ob, 'index.html', request))
 
         # Make sure we can access available attrs and not others
         for n in ('GET', 'HEAD', 'publishTraverse', 'request', '__call__'):


=== Zope3/src/zope/app/publisher/browser/tests/test_icondirective.py 1.11 => 1.12 ===
--- Zope3/src/zope/app/publisher/browser/tests/test_icondirective.py:1.11	Sun Sep 21 13:32:42 2003
+++ Zope3/src/zope/app/publisher/browser/tests/test_icondirective.py	Mon Sep 22 18:37:26 2003
@@ -32,6 +32,7 @@
 from zope.interface import implements
 from zope.app.interfaces.services.service import ISite
 from zope.app.interfaces.traversing import IContainmentRoot
+from zope.security.checker import ProxyFactory
 
 import zope.app.publisher.browser
 
@@ -89,7 +90,7 @@
             'width="16" height="16" border="0" />'
             % rname)
 
-        resource = getResource(ob, rname, request)
+        resource = ProxyFactory(getResource(ob, rname, request))
 
         self.assertRaises(Forbidden, getattr, resource, '_testData')
         resource = removeAllProxies(resource)
@@ -120,7 +121,7 @@
             'height="16" border="0" />'
             % rname)
 
-        resource = getResource(ob, rname, request)
+        resource = ProxyFactory(getResource(ob, rname, request))
 
         # Resources come ready-wrapped from the factory
         #resource = ProxyFactory(resource)




More information about the Zope3-Checkins mailing list