[Zope3-checkins] CVS: Zope3/src/zope/app/publisher/browser/tests - test_resource.py:1.5.6.1

Jim Fulton jim at zope.com
Mon Sep 8 15:22:17 EDT 2003


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

Modified Files:
      Tag: parentgeddon-branch
	test_resource.py 
Log Message:
Checking in work in progress on parentgeddon-branch so Fred can help
me to get the tests passing.  Specific log entries will be provided
when we merge this into the head.


=== Zope3/src/zope/app/publisher/browser/tests/test_resource.py 1.5 => 1.5.6.1 ===
--- Zope3/src/zope/app/publisher/browser/tests/test_resource.py:1.5	Fri Aug 15 20:43:51 2003
+++ Zope3/src/zope/app/publisher/browser/tests/test_resource.py	Mon Sep  8 14:21:46 2003
@@ -16,7 +16,6 @@
 $Id$
 """
 import unittest
-from zope.app.context import ContextWrapper
 from zope.app.publisher.browser.resource import Resource
 from zope.component.interfaces import IResourceService
 from zope.interface import implements
@@ -29,21 +28,27 @@
 
     def testGlobal(self):
         req = TestRequest()
-        r = ContextWrapper(Resource(req), Service(), name="foo")
+        r = Resource(req)
+        r.__parent__ = Service()
+        r.__name__ = 'foo'
         self.assertEquals(r(), '/@@/foo')
-        r = ContextWrapper(Resource(req), Service(), name="++resource++foo")
+        r.__name__ = '++resource++foo'
         self.assertEquals(r(), '/@@/foo')
 
     def testGlobalWithSkin(self):
         req = TestRequest()
         req._presentation_skin = 'bar'
-        r = ContextWrapper(Resource(req), Service(), name="foo")
+        r = Resource(req)
+        r.__parent__ = Service()
+        r.__name__ = 'foo'
         self.assertEquals(r(), '/++skin++bar/@@/foo')
 
     def testGlobalInVirtualHost(self):
         req = TestRequest()
         req.setVirtualHostRoot(['x', 'y'])
-        r = ContextWrapper(Resource(req), Service(), name="foo")
+        r = Resource(req)
+        r.__parent__ = Service()
+        r.__name__ = 'foo'
         self.assertEquals(r(), '/x/y/@@/foo')
 
 




More information about the Zope3-Checkins mailing list