[Zope3-checkins] CVS: Zope3/src/zope/app/workflow/stateful/tests - test_instance.py:1.7 test_xmlimportexport.py:1.4
Jim Fulton
jim@zope.com
Sat, 21 Jun 2003 17:22:48 -0400
Update of /cvs-repository/Zope3/src/zope/app/workflow/stateful/tests
In directory cvs.zope.org:/tmp/cvs-serv2745/src/zope/app/workflow/stateful/tests
Modified Files:
test_instance.py test_xmlimportexport.py
Log Message:
Major refactoring to reflect change in terminology from
"configuration" to "registration" to refer to the configuration of how
objects are used (as opposed to their internal configuration).
=== Zope3/src/zope/app/workflow/stateful/tests/test_instance.py 1.6 => 1.7 ===
--- Zope3/src/zope/app/workflow/stateful/tests/test_instance.py:1.6 Thu Jun 5 08:03:20 2003
+++ Zope3/src/zope/app/workflow/stateful/tests/test_instance.py Sat Jun 21 17:22:17 2003
@@ -33,13 +33,13 @@
from zope.app.context import ContextWrapper
-from zope.app.interfaces.services.configuration import IUseConfigurable
-from zope.app.interfaces.services.configuration import IUseConfiguration
+from zope.app.interfaces.services.registration import IRegisterable
+from zope.app.interfaces.services.registration import IRegistered
from zope.app.interfaces.annotation import IAttributeAnnotatable
-from zope.app.interfaces.services.configuration import Active
+from zope.app.interfaces.services.registration import ActiveStatus
from zope.app.workflow.tests.workflowsetup import WorkflowSetup
-from zope.app.workflow.service import ProcessDefinitionConfiguration
+from zope.app.workflow.service import ProcessDefinitionRegistration
from zope.app.interfaces.workflow.stateful \
import IStatefulProcessInstance
from zope.app.workflow.stateful.definition \
@@ -51,9 +51,9 @@
# define and create ProcessDefinition (PD) for tests
class TestProcessDefinition(StatefulProcessDefinition):
- implements(IAttributeAnnotatable, IUseConfigurable, IUseConfiguration)
+ implements(IAttributeAnnotatable, IRegisterable, IRegistered)
- # Incompletely implementing IUseConfiguration
+ # Incompletely implementing IRegistered
def addUsage(self, location):
pass
@@ -97,10 +97,10 @@
self.default.setObject('pd1', pd )
- self.cm.setObject('', ProcessDefinitionConfiguration('definition1',
+ self.cm.setObject('', ProcessDefinitionRegistration('definition1',
'/++etc++site/default/pd1'))
- zapi.traverse(self.default.getConfigurationManager(),
- '2').status = Active
+ zapi.traverse(self.default.getRegistrationManager(),
+ '2').status = ActiveStatus
self.pd = self.service.getProcessDefinition('definition1')
# give the pi some context to find a service
@@ -191,9 +191,9 @@
self.default.setObject('pd1', pd )
- self.cm.setObject('', ProcessDefinitionConfiguration('definition1',
+ self.cm.setObject('', ProcessDefinitionRegistration('definition1',
'/++etc++site/default/pd1'))
- zapi.traverse(self.default.getConfigurationManager(), '2').status = Active
+ zapi.traverse(self.default.getRegistrationManager(), '2').status = ActiveStatus
self.pd = self.service.getProcessDefinition('definition1')
# give the pi some context to find a service
@@ -282,10 +282,10 @@
self.default.setObject('pd1', pd )
- k = self.cm.setObject('', ProcessDefinitionConfiguration('definition1',
+ k = self.cm.setObject('', ProcessDefinitionRegistration('definition1',
'/++etc++site/default/pd1'))
- zapi.traverse(self.default.getConfigurationManager(),
- k).status = Active
+ zapi.traverse(self.default.getRegistrationManager(),
+ k).status = ActiveStatus
self.pd = self.service.getProcessDefinition('definition1')
# give the pi some context to find a service
@@ -375,10 +375,10 @@
self.default.setObject('pd1', pd )
- k = self.cm.setObject('', ProcessDefinitionConfiguration('definition1',
+ k = self.cm.setObject('', ProcessDefinitionRegistration('definition1',
'/++etc++site/default/pd1'))
- zapi.traverse(self.default.getConfigurationManager(),
- k).status = Active
+ zapi.traverse(self.default.getRegistrationManager(),
+ k).status = ActiveStatus
self.pd = self.service.getProcessDefinition('definition1')
# give the pi some context to find a service
=== Zope3/src/zope/app/workflow/stateful/tests/test_xmlimportexport.py 1.3 => 1.4 ===
--- Zope3/src/zope/app/workflow/stateful/tests/test_xmlimportexport.py:1.3 Fri Jun 6 15:29:07 2003
+++ Zope3/src/zope/app/workflow/stateful/tests/test_xmlimportexport.py Sat Jun 21 17:22:17 2003
@@ -11,35 +11,27 @@
# FOR A PARTICULAR PURPOSE.
#
##############################################################################
-import unittest
-from StringIO import StringIO
-
-from zope.interface.verify import verifyClass
-from zope.interface import implements, classImplements
+from StringIO import StringIO
+from zope.app.attributeannotations import AttributeAnnotations
+from zope.app.dublincore.annotatableadapter import ZDCAnnotatableAdapter
+from zope.app.interfaces.annotation import IAnnotatable, IAnnotations
+from zope.app.interfaces.annotation import IAttributeAnnotatable
+from zope.app.interfaces.dublincore import IZopeDublinCore
+from zope.app.interfaces.services.registration import IRegisterable
+from zope.app.interfaces.workflow import IProcessDefinitionExportHandler
+from zope.app.interfaces.workflow import IProcessDefinitionImportHandler
from zope.app.services.tests.placefulsetup import PlacefulSetup
+from zope.app.workflow.stateful.definition import StatefulProcessDefinition
+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.component import getAdapter
-
+from zope.interface import implements, classImplements
+from zope.interface.verify import verifyClass
from zope.security.checker import CheckerPublic
-
-from zope.app.dublincore.annotatableadapter \
- import ZDCAnnotatableAdapter
-from zope.app.attributeannotations import AttributeAnnotations
-from zope.app.interfaces.dublincore import IZopeDublinCore
-from zope.app.interfaces.annotation \
- import IAnnotatable, IAnnotations, IAttributeAnnotatable
-
-from zope.app.interfaces.services.configuration \
- import IUseConfigurable
-
-from zope.app.workflow.stateful.definition \
- import StatefulProcessDefinition, State, Transition
-
-from zope.app.interfaces.workflow import IProcessDefinitionImportHandler
-from zope.app.interfaces.workflow import IProcessDefinitionExportHandler
-from zope.app.workflow.stateful.xmlimportexport \
- import XMLImportHandler, XMLExportHandler
+import unittest
xml_text = """<?xml version="1.0"?>
@@ -85,7 +77,7 @@
class TestProcessDefinition(StatefulProcessDefinition):
- implements(IAttributeAnnotatable, IUseConfigurable)
+ implements(IAttributeAnnotatable, IRegisterable)
# need to patch this cause these classes are used directly
# in the import/export classes