[Checkins] SVN: zope.app.intid/trunk/src/zope/app/intid/ Substitute zope.app.zapi by direct calls to its wrapped apis. See bug 219302

Lorenzo Gil lgs at sicem.biz
Wed Apr 23 15:07:03 EDT 2008


Log message for revision 85661:
  Substitute zope.app.zapi by direct calls to its wrapped apis. See bug 219302

Changed:
  U   zope.app.intid/trunk/src/zope/app/intid/browser/__init__.py
  U   zope.app.intid/trunk/src/zope/app/intid/tests.py

-=-
Modified: zope.app.intid/trunk/src/zope/app/intid/browser/__init__.py
===================================================================
--- zope.app.intid/trunk/src/zope/app/intid/browser/__init__.py	2008-04-23 18:59:23 UTC (rev 85660)
+++ zope.app.intid/trunk/src/zope/app/intid/browser/__init__.py	2008-04-23 19:07:02 UTC (rev 85661)
@@ -16,9 +16,9 @@
 $Id$
 """
 from zope.security.proxy import removeSecurityProxy
-from zope.app import zapi
-    
+from zope.traversing.api import traverse, getPath
 
+
 class IntIdsView(object):
 
     def len(self):
@@ -26,10 +26,10 @@
 
     def populate(self):
         # TODO: I think this should be moved to the functional test.
-        self.context.register(zapi.traverse(self.context, "/"))
-        self.context.register(zapi.traverse(self.context, "/++etc++site"))
+        self.context.register(traverse(self.context, "/"))
+        self.context.register(traverse(self.context, "/++etc++site"))
         self.request.response.redirect('index.html')
 
     def _items(self):
         """return all items and their path (for testing only!)"""
-        return [(uid, zapi.getPath(ref())) for uid, ref in self.context.items()]
+        return [(uid, getPath(ref())) for uid, ref in self.context.items()]

Modified: zope.app.intid/trunk/src/zope/app/intid/tests.py
===================================================================
--- zope.app.intid/trunk/src/zope/app/intid/tests.py	2008-04-23 18:59:23 UTC (rev 85660)
+++ zope.app.intid/trunk/src/zope/app/intid/tests.py	2008-04-23 19:07:02 UTC (rev 85661)
@@ -28,10 +28,12 @@
 from zope.interface.verify import verifyObject
 from zope.location.interfaces import ILocation
 
+from zope.component import getSiteManager
 from zope.component.interfaces import IFactory
 
+from zope.traversing.api import traverse
+
 from zope.app.testing import setup, ztapi
-from zope.app import zapi
 from zope.app.component.hooks import setSite
 
 from zope.app.intid import IntIds
@@ -191,7 +193,7 @@
 
         ReferenceSetupMixin.setUp(self)
 
-        sm = zapi.getSiteManager(self.root)
+        sm = getSiteManager(self.root)
         self.utility = setup.addUtility(sm, '1', IIntIds, IntIds())
 
         self.root['folder1'] = Folder()
@@ -269,7 +271,7 @@
         self.basepath = '/++etc++site/default'
         root = self.getRootFolder()
 
-        sm = zapi.traverse(root, '/++etc++site')
+        sm = traverse(root, '/++etc++site')
         setup.addUtility(sm, 'intid', IIntIds, IntIds())
         commit()
 



More information about the Checkins mailing list