[Zope3-checkins] CVS: Zope3/src/zope/app/component/tests -
test_nextservice.py:1.9
Jim Fulton
jim at zope.com
Sun Sep 21 13:31:28 EDT 2003
Update of /cvs-repository/Zope3/src/zope/app/component/tests
In directory cvs.zope.org:/tmp/cvs-serv13143/src/zope/app/component/tests
Modified Files:
test_nextservice.py
Log Message:
Use the location framework rather than context wrappers.
=== Zope3/src/zope/app/component/tests/test_nextservice.py 1.8 => 1.9 ===
--- Zope3/src/zope/app/component/tests/test_nextservice.py:1.8 Tue Sep 2 16:46:45 2003
+++ Zope3/src/zope/app/component/tests/test_nextservice.py Sun Sep 21 13:31:27 2003
@@ -23,8 +23,7 @@
from zope.component.exceptions import ComponentLookupError
from zope.component.interfaces import IServiceService
from zope.component.service import serviceManager
-from zope.context import Wrapper
-from zope.interface import implements, directlyProvides
+from zope.interface import implements, directlyProvides, directlyProvidedBy
class ServiceManager:
@@ -40,11 +39,16 @@
def setSiteManager(self, sm):
self.sm = sm
- directlyProvides(self, ISite)
+ sm.__parent__ = self
+ directlyProvides(self, ISite, directlyProvidedBy(self))
class Root(Folder):
implements(IContainmentRoot)
+
+def Wrapper(ob, container):
+ ob.__parent__ = container
+ return ob
class Test(TestCase):
More information about the Zope3-Checkins
mailing list