[Zope3-checkins] CVS: Zope3/src/zope/app/workflow/stateful/tests -
test_contentworkflow.py:1.9 test_xmlimportexport.py:1.8
Jim Fulton
cvs-admin at zope.org
Fri Nov 21 12:12:17 EST 2003
Update of /cvs-repository/Zope3/src/zope/app/workflow/stateful/tests
In directory cvs.zope.org:/tmp/cvs-serv31883/src/zope/app/workflow/stateful/tests
Modified Files:
test_contentworkflow.py test_xmlimportexport.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/workflow/stateful/tests/test_contentworkflow.py 1.8 => 1.9 ===
--- Zope3/src/zope/app/workflow/stateful/tests/test_contentworkflow.py:1.8 Sun Sep 21 13:33:59 2003
+++ Zope3/src/zope/app/workflow/stateful/tests/test_contentworkflow.py Fri Nov 21 12:12:16 2003
@@ -36,7 +36,7 @@
from zope.app.workflow.tests.workflowsetup import WorkflowSetup
from zope.app.workflow.tests.test_service import DummyProcessDefinition
from zope.component import getServiceManager
-from zope.component.adapter import provideAdapter
+from zope.app.tests import ztapi
from zope.interface import Interface, implements
from zope.interface.verify import verifyClass
@@ -75,8 +75,8 @@
setup.addService(self.sm, EventSubscription, self.events)
clearEvents()
eventPublisher.globalSubscribe(EventRecorder)
- provideAdapter(IAnnotatable, IProcessInstanceContainer,
- ProcessInstanceContainerAdapter)
+ ztapi.provideAdapter(IAnnotatable, IProcessInstanceContainer,
+ ProcessInstanceContainerAdapter)
def testInterface(self):
verifyClass(IContentWorkflowsManager, ContentWorkflowsManager)
=== Zope3/src/zope/app/workflow/stateful/tests/test_xmlimportexport.py 1.7 => 1.8 ===
--- Zope3/src/zope/app/workflow/stateful/tests/test_xmlimportexport.py:1.7 Fri Aug 15 20:44:37 2003
+++ Zope3/src/zope/app/workflow/stateful/tests/test_xmlimportexport.py Fri Nov 21 12:12:17 2003
@@ -29,7 +29,7 @@
from zope.app.workflow.stateful.definition import State, Transition
from zope.app.workflow.stateful.xmlimportexport import XMLExportHandler
from zope.app.workflow.stateful.xmlimportexport import XMLImportHandler
-from zope.component.adapter import provideAdapter
+from zope.app.tests import ztapi
from zope.component import getAdapter, getService, getServiceManager
from zope.interface import implements, classImplements, Interface
from zope.interface.verify import verifyClass
@@ -103,9 +103,10 @@
def setUp(self):
PlacefulSetup.setUp(self)
- provideAdapter(IAttributeAnnotatable, IAnnotations,
- AttributeAnnotations)
- provideAdapter(IAnnotatable, IZopeDublinCore, ZDCAnnotatableAdapter)
+ ztapi.provideAdapter(IAttributeAnnotatable, IAnnotations,
+ AttributeAnnotations)
+ ztapi.provideAdapter(IAnnotatable, IZopeDublinCore,
+ ZDCAnnotatableAdapter)
sm = getServiceManager(None)
sm.defineService(Permissions, IPermissionService)
sm.provideService(Permissions, permissionRegistry)
More information about the Zope3-Checkins
mailing list