[Zope3-checkins] CVS: Zope3/src/zope/app/workflow/stateful/tests - test_contentworkflow.py:1.2 test_instance.py:1.5
Jim Fulton
jim@zope.com
Tue, 3 Jun 2003 18:46:55 -0400
Update of /cvs-repository/Zope3/src/zope/app/workflow/stateful/tests
In directory cvs.zope.org:/tmp/cvs-serv6144/src/zope/app/workflow/stateful/tests
Modified Files:
test_contentworkflow.py test_instance.py
Log Message:
After cleaning up placefull test setup (see earlier checkins)
cleaned up unneeded imports in test modules (and some other modules)
based on the results of running Martijn Faassen's importchecker tool.
=== Zope3/src/zope/app/workflow/stateful/tests/test_contentworkflow.py 1.1 => 1.2 ===
--- Zope3/src/zope/app/workflow/stateful/tests/test_contentworkflow.py:1.1 Thu May 8 13:27:20 2003
+++ Zope3/src/zope/app/workflow/stateful/tests/test_contentworkflow.py Tue Jun 3 18:46:23 2003
@@ -18,7 +18,6 @@
"""
import unittest
-from zope.interface import Interface
from zope.interface.verify import verifyClass
from zope.app.interfaces.workflow.stateful import IContentWorkflowsUtility
=== Zope3/src/zope/app/workflow/stateful/tests/test_instance.py 1.4 => 1.5 ===
--- Zope3/src/zope/app/workflow/stateful/tests/test_instance.py:1.4 Tue Jun 3 10:34:04 2003
+++ Zope3/src/zope/app/workflow/stateful/tests/test_instance.py Tue Jun 3 18:46:23 2003
@@ -30,18 +30,14 @@
from zope.app.services.servicenames import Permissions
from zope.security.checker import CheckerPublic
from zope.security.management import newSecurityManager
-from zope.security.management import system_user
from zope.app.context import ContextWrapper
-from zope.app.traversing import traverse
from zope.app.interfaces.services.configuration import IUseConfigurable
from zope.app.interfaces.annotation import IAttributeAnnotatable
-from zope.app.interfaces.services.configuration \
- import Active, Unregistered, Registered
+from zope.app.interfaces.services.configuration import Active
from zope.app.workflow.tests.workflowsetup import WorkflowSetup
-from zope.app.workflow.service import WorkflowService
from zope.app.workflow.service import ProcessDefinitionConfiguration
from zope.app.interfaces.workflow.stateful \
import IStatefulProcessInstance
@@ -49,6 +45,7 @@
import StatefulProcessDefinition, State, Transition
from zope.app.workflow.stateful.instance \
import StatefulProcessInstance, StateChangeInfo
+from zope.app import zapi
# define and create ProcessDefinition (PD) for tests
@@ -98,7 +95,8 @@
self.cm.setObject('', ProcessDefinitionConfiguration('definition1',
'/++etc++site/default/pd1'))
- traverse(self.default.getConfigurationManager(), '2').status = Active
+ zapi.traverse(self.default.getConfigurationManager(),
+ '2').status = Active
self.pd = self.service.getProcessDefinition('definition1')
# give the pi some context to find a service
@@ -191,7 +189,7 @@
self.cm.setObject('', ProcessDefinitionConfiguration('definition1',
'/++etc++site/default/pd1'))
- traverse(self.default.getConfigurationManager(), '2').status = Active
+ zapi.traverse(self.default.getConfigurationManager(), '2').status = Active
self.pd = self.service.getProcessDefinition('definition1')
# give the pi some context to find a service
@@ -280,9 +278,10 @@
self.default.setObject('pd1', pd )
- self.cm.setObject('', ProcessDefinitionConfiguration('definition1',
+ k = self.cm.setObject('', ProcessDefinitionConfiguration('definition1',
'/++etc++site/default/pd1'))
- traverse(self.default.getConfigurationManager(), '2').status = Active
+ zapi.traverse(self.default.getConfigurationManager(),
+ k).status = Active
self.pd = self.service.getProcessDefinition('definition1')
# give the pi some context to find a service
@@ -372,9 +371,10 @@
self.default.setObject('pd1', pd )
- self.cm.setObject('', ProcessDefinitionConfiguration('definition1',
+ k = self.cm.setObject('', ProcessDefinitionConfiguration('definition1',
'/++etc++site/default/pd1'))
- traverse(self.default.getConfigurationManager(), '2').status = Active
+ zapi.traverse(self.default.getConfigurationManager(),
+ k).status = Active
self.pd = self.service.getProcessDefinition('definition1')
# give the pi some context to find a service