[Zope3-checkins] CVS: Zope3/src/zope/app/workflow/tests - workflowsetup.py:1.2

Steve Alexander steve@cat-box.net
Tue, 3 Jun 2003 10:38:29 -0400


Update of /cvs-repository/Zope3/src/zope/app/workflow/tests
In directory cvs.zope.org:/tmp/cvs-serv31579/src/zope/app/workflow/tests

Modified Files:
	workflowsetup.py 
Log Message:
improved formatting, new implements() style, removed unneeded import


=== Zope3/src/zope/app/workflow/tests/workflowsetup.py 1.1 => 1.2 ===
--- Zope3/src/zope/app/workflow/tests/workflowsetup.py:1.1	Thu May  8 13:27:20 2003
+++ Zope3/src/zope/app/workflow/tests/workflowsetup.py	Tue Jun  3 10:38:29 2003
@@ -17,7 +17,6 @@
 $Id$
 """
 from zope.app.traversing import traverse, getPath
-from zope.app.container.zopecontainer import ZopeContainerAdapter
 from zope.app.services.service import ServiceManager
 from zope.app.services.service import ServiceConfiguration
 
@@ -28,14 +27,11 @@
 from zope.app.interfaces.security import IAuthenticationService
 from zope.app.interfaces.security import IRoleService
 from zope.app.interfaces.security import IPermissionService
-from zope.app.security.registries.principalregistry \
-     import principalRegistry
-from zope.app.security.registries.permissionregistry \
-     import permissionRegistry
+from zope.app.security.registries.principalregistry import principalRegistry
+from zope.app.security.registries.permissionregistry import permissionRegistry
 
 from zope.app.interfaces.dependable import IDependable
-from zope.app.services.tests.placefulsetup \
-     import PlacefulSetup
+from zope.app.services.tests.placefulsetup import PlacefulSetup
 from zope.app.interfaces.annotation import IAnnotatable
 from zope.app.interfaces.annotation import IAttributeAnnotatable
 from zope.app.attributeannotations import AttributeAnnotations
@@ -52,14 +48,11 @@
 
 from zope.app.workflow.service import WorkflowService
 
-
-
+from zope.interface import implements
 
 class WorkflowServiceForTests(WorkflowService):
 
-    __implements__ = WorkflowService.__implements__, IAttributeAnnotatable
-
-
+    implements(IAttributeAnnotatable)
 
 
 class WorkflowSetup(PlacefulSetup):
@@ -73,7 +66,7 @@
                        IAnnotations, AttributeAnnotations)
         provideAdapter(IAnnotatable, IDependable, Dependable)
         provideAdapter(IUseConfigurable, IUseConfiguration, UseConfiguration)
-        
+
         # Set up a local workflow service
         self.buildFolders()
         self.rootFolder.setServiceManager(ServiceManager())
@@ -103,18 +96,17 @@
         # XXX change to unique name
         self.service1 = traverse(self.default1, service_name1)
         path1 = "%s/%s" % (getPath(default1), service_name1)
-        configuration1 = ServiceConfiguration(Workflows, path1, self.rootFolder)
+        configuration1 = ServiceConfiguration(Workflows, path1,
+                                              self.rootFolder)
         self.cm1 = default1.getConfigurationManager()
         self.cm1.setObject('', configuration1)
         traverse(self.cm1, '1').status = Active
 
-
     def setupAuthService(self):
         self.root_sm.defineService(Authentication, IAuthenticationService)
         self.root_sm.provideService(Authentication, principalRegistry)
         return getService(self.rootFolder, Authentication)
 
-
     def setupRoleService(self):
         self.root_sm.defineService(Roles, IRoleService)
         self.root_sm.provideService(Roles, roleRegistry)
@@ -124,6 +116,4 @@
         self.root_sm.defineService(Permissions, IPermissionService)
         self.root_sm.provideService(Permissions, permissionRegistry)
         return getService(self.rootFolder, Permissions)
-
-