[Zope3-checkins] CVS: Zope3/src/zope/app/publisher/browser/tests -
test_resource.py:1.4.2.1
Stephan Richter
srichter at cosmos.phy.tufts.edu
Fri Aug 15 21:11:21 EDT 2003
Update of /cvs-repository/Zope3/src/zope/app/publisher/browser/tests
In directory cvs.zope.org:/tmp/cvs-serv15358/publisher/browser/tests
Modified Files:
Tag: dreamcatcher-ttwschema-branch
test_resource.py
Log Message:
Forgot to check in this fix.
=== Zope3/src/zope/app/publisher/browser/tests/test_resource.py 1.4 => 1.4.2.1 ===
--- Zope3/src/zope/app/publisher/browser/tests/test_resource.py:1.4 Fri Aug 8 14:07:27 2003
+++ Zope3/src/zope/app/publisher/browser/tests/test_resource.py Fri Aug 15 20:11:17 2003
@@ -15,33 +15,35 @@
$Id$
"""
-
import unittest
-from zope.publisher.browser import TestRequest
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
+from zope.publisher.browser import TestRequest
+
+class Service:
+ implements(IResourceService)
class TestResource(unittest.TestCase):
def testGlobal(self):
- from zope.app.publisher.browser.resource import Resource
req = TestRequest()
- r = ContextWrapper(Resource(req), None, name="foo")
+ r = ContextWrapper(Resource(req), Service(), name="foo")
self.assertEquals(r(), '/@@/foo')
- r = ContextWrapper(Resource(req), None, name="++resource++foo")
+ r = ContextWrapper(Resource(req), Service(), name="++resource++foo")
self.assertEquals(r(), '/@@/foo')
def testGlobalWithSkin(self):
- from zope.app.publisher.browser.resource import Resource
req = TestRequest()
req._presentation_skin = 'bar'
- r = ContextWrapper(Resource(req), None, name="foo")
+ r = ContextWrapper(Resource(req), Service(), name="foo")
self.assertEquals(r(), '/++skin++bar/@@/foo')
def testGlobalInVirtualHost(self):
- from zope.app.publisher.browser.resource import Resource
req = TestRequest()
req.setVirtualHostRoot(['x', 'y'])
- r = ContextWrapper(Resource(req), None, name="foo")
+ r = ContextWrapper(Resource(req), Service(), name="foo")
self.assertEquals(r(), '/x/y/@@/foo')
More information about the Zope3-Checkins
mailing list