[Zope3-checkins] CVS: Zope3/src/zope/app/apidoc/ifacemodule -
__init__.py:1.4 tests.py:1.2
Suresh Babu Eddala
sbabu at zeomega.com
Fri Mar 5 10:45:53 EST 2004
Update of /cvs-repository/Zope3/src/zope/app/apidoc/ifacemodule
In directory cvs.zope.org:/tmp/cvs-serv9833/src/zope/app/apidoc/ifacemodule
Modified Files:
__init__.py tests.py
Log Message:
removed local interface service stuff, it uses global utility service.
=== Zope3/src/zope/app/apidoc/ifacemodule/__init__.py 1.3 => 1.4 ===
--- Zope3/src/zope/app/apidoc/ifacemodule/__init__.py:1.3 Wed Mar 3 05:38:31 2004
+++ Zope3/src/zope/app/apidoc/ifacemodule/__init__.py Fri Mar 5 10:45:52 2004
@@ -26,6 +26,8 @@
from zope.app.apidoc.interfaces import IDocumentationModule
from zope.app.apidoc.utilities import ReadContainerBase
from zope.app.location import LocationProxy
+from zope.app.component.interface \
+ import queryInterface, searchInterfaceUtilities
class IInterfaceModule(IDocumentationModule):
"""Interface API Documentation Module
@@ -86,9 +88,8 @@
"""
def get(self, key, default=None):
- """See zope.app.container.interfaces.IReadContainer"""
- service = zapi.getService(self, 'Interfaces')
- iface = service.queryInterface(key, default)
+ """See zope.app.interfaces.container.IReadContainer"""
+ iface = queryInterface(key, default)
if iface is default:
# Yeah, we find more items than we claim to have! This way we can
# handle all interfaces using this module. :-)
@@ -106,9 +107,8 @@
return iface
def items(self):
- """See zope.app.container.interfaces.IReadContainer"""
- service = zapi.getService(self, 'Interfaces')
- items = list(service.items())
+ """See zope.app.interfaces.container.IReadContainer"""
+ items = list(searchInterfaceUtilities(self))
items.sort()
items = [(i[0], LocationProxy(i[1], self, i[0])) for i in items]
return items
=== Zope3/src/zope/app/apidoc/ifacemodule/tests.py 1.1 => 1.2 ===
--- Zope3/src/zope/app/apidoc/ifacemodule/tests.py:1.1 Thu Feb 19 15:46:41 2004
+++ Zope3/src/zope/app/apidoc/ifacemodule/tests.py Fri Mar 5 10:45:52 2004
@@ -16,7 +16,6 @@
$Id$
"""
import unittest
-from zope.app import zapi
from zope.app.interfaces.traversing import IContainmentRoot
from zope.app.location import LocationProxy
from zope.app.tests import placelesssetup
@@ -24,13 +23,13 @@
from zope.app.apidoc.ifacemodule import IInterfaceModule
from zope.app.apidoc.interfaces import IDocumentationModule
from zope.testing.doctestunit import DocTestSuite
+from zope.app.component.interface import provideInterface
def setUp():
placelesssetup.setUp()
- service = zapi.getService(None, 'Interfaces')
- service.provideInterface(None, IDocumentationModule)
- service.provideInterface('IInterfaceModule', IInterfaceModule)
+ provideInterface(None, IDocumentationModule)
+ provideInterface('IInterfaceModule', IInterfaceModule)
def tearDown():
placelesssetup.tearDown()
More information about the Zope3-Checkins
mailing list