Index: src/zope/app/applicationcontrol/tests/test_runtimeinfo.py =================================================================== --- src/zope/app/applicationcontrol/tests/test_runtimeinfo.py (revisión: 85441) +++ src/zope/app/applicationcontrol/tests/test_runtimeinfo.py (copia de trabajo) @@ -22,7 +22,7 @@ except ImportError: locale = None -from zope.app import zapi +import zope.component from zope.interface import implements from zope.interface.verify import verifyObject from zope.app.applicationcontrol.applicationcontrol import applicationController @@ -80,7 +80,9 @@ # we expect that there is no utility self.assertEqual(runtime_info.getZopeVersion(), u"Unavailable") - zapi.getSiteManager().registerUtility(TestZopeVersion(), IZopeVersion) + siteManager = zope.component.getSiteManager() + siteManager.registerUtility(TestZopeVersion(), IZopeVersion) + self.assertEqual(runtime_info.getZopeVersion(), stupid_version_string) def test_PythonVersion(self): Index: src/zope/app/applicationcontrol/browser/tests/test_servercontrolview.py =================================================================== --- src/zope/app/applicationcontrol/browser/tests/test_servercontrolview.py (revisión: 85441) +++ src/zope/app/applicationcontrol/browser/tests/test_servercontrolview.py (copia de trabajo) @@ -17,8 +17,8 @@ """ import unittest +import zope.component from zope.interface import implements -from zope.app import zapi from zope.app.applicationcontrol.applicationcontrol import applicationController from zope.app.applicationcontrol.browser.servercontrol import ServerControlView from zope.app.applicationcontrol.interfaces import IServerControl @@ -46,7 +46,8 @@ def test_ServerControlView(self): control = ServerControlStub() - zapi.getGlobalSiteManager().registerUtility(control, IServerControl) + globalSiteManager = zope.component.getGlobalSiteManager() + globalSiteManager.registerUtility(control, IServerControl) test_serverctrl = self._TestView__newView( applicationController, Index: src/zope/app/applicationcontrol/browser/servercontrol.py =================================================================== --- src/zope/app/applicationcontrol/browser/servercontrol.py (revisión: 85441) +++ src/zope/app/applicationcontrol/browser/servercontrol.py (copia de trabajo) @@ -17,7 +17,7 @@ """ __docformat__ = 'restructuredtext' -from zope.app import zapi +import zope.component from zope.app.applicationcontrol.interfaces import IServerControl from zope.app.applicationcontrol.i18n import ZopeMessageFactory as _ @@ -26,7 +26,7 @@ class ServerControlView(object): def serverControl(self): - return zapi.getUtility(IServerControl) + return zope.component.getUtility(IServerControl) def action(self): """Do the shutdown/restart!""" Index: src/zope/app/applicationcontrol/browser/translationdomaincontrol.py =================================================================== --- src/zope/app/applicationcontrol/browser/translationdomaincontrol.py (revisión: 85441) +++ src/zope/app/applicationcontrol/browser/translationdomaincontrol.py (copia de trabajo) @@ -17,8 +17,8 @@ """ __docformat__ = 'restructuredtext' +import zope.component from zope.i18n.interfaces import ITranslationDomain -from zope.app import zapi from zope.app.applicationcontrol.i18n import ZopeMessageFactory as _ @@ -26,7 +26,7 @@ def getCatalogsInfo(self): info = [] - for name, domain in zapi.getUtilitiesFor(ITranslationDomain): + for name, domain in zope.component.getUtilitiesFor(ITranslationDomain): if not hasattr(domain, 'getCatalogsInfo'): continue lang_info = [] @@ -44,7 +44,7 @@ language = self.request.get('language') domain = self.request.get('domain') - domain = zapi.getUtility(ITranslationDomain, domain) + domain = zope.component.getUtility(ITranslationDomain, domain) for lang, fileNames in domain.getCatalogsInfo().items(): if lang == language: domain.reloadCatalogs(fileNames)