[Zope3-checkins] SVN: Zope3/trunk/src/zope/app/testing/ clean imports, remove zapi dep

Bernd Dorn bernd.dorn at lovelysystems.com
Mon Mar 26 10:43:18 EDT 2007


Log message for revision 73631:
  clean imports, remove zapi dep

Changed:
  U   Zope3/trunk/src/zope/app/testing/back35.py
  U   Zope3/trunk/src/zope/app/testing/functional.py
  U   Zope3/trunk/src/zope/app/testing/setup.py

-=-
Modified: Zope3/trunk/src/zope/app/testing/back35.py
===================================================================
--- Zope3/trunk/src/zope/app/testing/back35.py	2007-03-26 14:31:31 UTC (rev 73630)
+++ Zope3/trunk/src/zope/app/testing/back35.py	2007-03-26 14:43:17 UTC (rev 73631)
@@ -16,8 +16,7 @@
 $Id$
 """
 
-from zope.app import zapi
-import zope.interface
+from zope.traversing.api import traverse
 from zope.component.service import IService
 from zope.app.component.site import UtilityRegistration
 from zope.app.component.back35 import ActiveStatus
@@ -27,9 +26,9 @@
 
     This utility is useful for tests that need to set up services.
     """
-    default = zapi.traverse(servicemanager, 'default')
+    default = traverse(servicemanager, 'default')
     default[name+suffix] = service
     registration = UtilityRegistration(name, IService, service, default)
     key = default.registrationManager.addRegistration(registration)
-    zapi.traverse(default.registrationManager, key).status = ActiveStatus
+    traverse(default.registrationManager, key).status = ActiveStatus
     return default[name+suffix]

Modified: Zope3/trunk/src/zope/app/testing/functional.py
===================================================================
--- Zope3/trunk/src/zope/app/testing/functional.py	2007-03-26 14:31:31 UTC (rev 73630)
+++ Zope3/trunk/src/zope/app/testing/functional.py	2007-03-26 14:43:17 UTC (rev 73631)
@@ -30,28 +30,19 @@
 from ZODB.DB import DB
 from ZODB.DemoStorage import DemoStorage
 
-from zope import interface, component
+from zope import component
 from zope.publisher.browser import BrowserRequest, setDefaultSkin
 from zope.publisher.http import HTTPRequest
 from zope.publisher.publish import publish
-from zope.publisher.xmlrpc import XMLRPCRequest
 from zope.security.interfaces import Forbidden, Unauthorized
-from zope.security.management import endInteraction
 from zope.testing import doctest
 
 import zope.app.testing.setup
-from zope.app import zapi
 from zope.app.debug import Debugger
 from zope.app.publication.http import HTTPPublication
-from zope.app.publication.browser import BrowserPublication
-from zope.app.publication.xmlrpc import XMLRPCPublication
-from zope.app.publication.soap import SOAPPublication
-from zope.app.publication.interfaces import ISOAPRequestFactory
 from zope.app.publication.zopepublication import ZopePublication
 from zope.app.publication.http import HTTPPublication
 from zope.app.publication.httpfactory import chooseClasses
-from zope.publisher.interfaces.browser import IDefaultBrowserLayer
-from zope.publisher.interfaces.browser import IDefaultSkin
 from zope.publisher.interfaces.browser import IBrowserRequest
 from zope.app.component.hooks import setSite, getSite
 

Modified: Zope3/trunk/src/zope/app/testing/setup.py
===================================================================
--- Zope3/trunk/src/zope/app/testing/setup.py	2007-03-26 14:31:31 UTC (rev 73630)
+++ Zope3/trunk/src/zope/app/testing/setup.py	2007-03-26 14:43:17 UTC (rev 73631)
@@ -16,7 +16,6 @@
 $Id$
 """
 import zope.component
-import zope.interface
 import zope.traversing.api
 
 import zope.deferredimport



More information about the Zope3-Checkins mailing list