[Zope3-checkins] CVS: Zope3/src/zope/app/utilities/tests -
test_content.py:1.5
Jim Fulton
cvs-admin at zope.org
Fri Nov 21 12:12:47 EST 2003
Update of /cvs-repository/Zope3/src/zope/app/utilities/tests
In directory cvs.zope.org:/tmp/cvs-serv31883/src/zope/app/utilities/tests
Modified Files:
test_content.py
Log Message:
Changed to use the new ztapi module, which provides handy functions
for setting up adapters and views for tests. This is needed because
there are no-longer global adapter and view services sitting around as
module globals.
=== Zope3/src/zope/app/utilities/tests/test_content.py 1.4 => 1.5 ===
--- Zope3/src/zope/app/utilities/tests/test_content.py:1.4 Sun Sep 21 13:30:46 2003
+++ Zope3/src/zope/app/utilities/tests/test_content.py Fri Nov 21 12:12:16 2003
@@ -35,7 +35,7 @@
ContentComponentDefinition, ContentComponentDefinitionRegistration, \
ContentComponentDefinitionMenuItem, ContentComponentInstance
from zope.component import getServiceManager
-from zope.component.adapter import provideAdapter
+from zope.app.tests import ztapi
from zope.component.exceptions import ComponentLookupError
from zope.interface import Interface, classImplements
from zope.schema import Int, TextLine, Text
@@ -53,9 +53,9 @@
self.rootFolder = setup.buildSampleFolderTree()
# Define Menu Item Adapter
- provideAdapter(IContentComponentDefinition,
- IContentComponentMenuItem,
- ContentComponentDefinitionMenuItem)
+ ztapi.provideAdapter(IContentComponentDefinition,
+ IContentComponentMenuItem,
+ ContentComponentDefinitionMenuItem)
# Define Menu Service
sm=getServiceManager(None)
@@ -114,9 +114,9 @@
setup.placefulSetUp()
classImplements(ContentComponentDefinition, ILocalUtility)
classImplements(ContentComponentDefinition, IAttributeAnnotatable)
- provideAdapter(IContentComponentDefinition,
- IContentComponentMenuItem,
- ContentComponentDefinitionMenuItem)
+ ztapi.provideAdapter(IContentComponentDefinition,
+ IContentComponentMenuItem,
+ ContentComponentDefinitionMenuItem)
sm=getServiceManager(None)
sm.defineService(BrowserMenu, IBrowserMenuService)
More information about the Zope3-Checkins
mailing list