[Zope3-checkins] CVS: Zope3/src/zope/app/services/tests - placefulsetup.py:1.24 test_adapter.py:1.17 test_auth.py:1.16 test_cacheconfiguration.py:1.12 test_configurationregistry.py:1.8 test_connectionconfiguration.py:1.13 test_connectionservice.py:1.10 test_eventservice.py:1.25 test_module.py:1.8 test_principalannotation.py:1.7 test_roleservice.py:1.4 test_serviceconfiguration.py:1.11

Jim Fulton jim@zope.com
Tue, 3 Jun 2003 18:46:53 -0400


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

Modified Files:
	placefulsetup.py test_adapter.py test_auth.py 
	test_cacheconfiguration.py test_configurationregistry.py 
	test_connectionconfiguration.py test_connectionservice.py 
	test_eventservice.py test_module.py 
	test_principalannotation.py test_roleservice.py 
	test_serviceconfiguration.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/services/tests/placefulsetup.py 1.23 => 1.24 ===
--- Zope3/src/zope/app/services/tests/placefulsetup.py:1.23	Tue Jun  3 17:43:00 2003
+++ Zope3/src/zope/app/services/tests/placefulsetup.py	Tue Jun  3 18:46:22 2003
@@ -20,7 +20,6 @@
 from zope.app import zapi
 from zope.app.tests import setup
 from zope.app.tests.placelesssetup import PlacelessSetup
-from zope.app.services.servicenames import HubIds
 from zope.app.content.folder import RootFolder
 from zope.app.context import ContextWrapper
 


=== Zope3/src/zope/app/services/tests/test_adapter.py 1.16 => 1.17 ===
--- Zope3/src/zope/app/services/tests/test_adapter.py:1.16	Tue Jun  3 17:43:00 2003
+++ Zope3/src/zope/app/services/tests/test_adapter.py	Tue Jun  3 18:46:22 2003
@@ -23,7 +23,6 @@
 from zope.app.context import ContextWrapper
 from zope.component.exceptions import ComponentLookupError
 from zope.app.services.tests.placefulsetup import PlacefulSetup
-from zope.app.services.service import ServiceManager
 from zope.app.services.adapter import AdapterConfiguration
 from zope.app.content.folder import RootFolder
 from zope.app.traversing import traverse


=== Zope3/src/zope/app/services/tests/test_auth.py 1.15 => 1.16 ===
--- Zope3/src/zope/app/services/tests/test_auth.py:1.15	Tue Jun  3 17:43:00 2003
+++ Zope3/src/zope/app/services/tests/test_auth.py	Tue Jun  3 18:46:22 2003
@@ -23,7 +23,7 @@
 from zope.exceptions import NotFoundError
 from zope.publisher.interfaces.http import IHTTPCredentials
 from zope.app.services.tests.eventsetup import EventSetup
-from zope.app.traversing import getPath, traverse
+from zope.app.traversing import traverse
 
 from zope.app.container.tests.test_icontainer import BaseTestIContainer
 from zope.interface import implements


=== Zope3/src/zope/app/services/tests/test_cacheconfiguration.py 1.11 => 1.12 ===
--- Zope3/src/zope/app/services/tests/test_cacheconfiguration.py:1.11	Tue Jun  3 17:43:00 2003
+++ Zope3/src/zope/app/services/tests/test_cacheconfiguration.py	Tue Jun  3 18:46:22 2003
@@ -30,7 +30,6 @@
 from zope.app.interfaces.services.service import ILocalService
 from zope.app.services.cache import CacheConfiguration
 from zope.app.services.configuration import ConfigurationRegistry
-from zope.app.services.service import ServiceManager
 from zope.app.services.tests.placefulsetup import PlacefulSetup
 from zope.app.tests import setup
 from zope.app.traversing import traverse


=== Zope3/src/zope/app/services/tests/test_configurationregistry.py 1.7 => 1.8 ===
--- Zope3/src/zope/app/services/tests/test_configurationregistry.py:1.7	Tue Jun  3 17:43:00 2003
+++ Zope3/src/zope/app/services/tests/test_configurationregistry.py	Tue Jun  3 18:46:22 2003
@@ -22,7 +22,6 @@
 from zope.app.services.tests.placefulsetup import PlacefulSetup
 from zope.app.context import ContextWrapper, getItem
 from zope.app.services.configuration import ConfigurationRegistry
-from zope.app.services.service import ServiceManager
 from zope.app.traversing import traverse
 
 class Configuration:


=== Zope3/src/zope/app/services/tests/test_connectionconfiguration.py 1.12 => 1.13 ===
--- Zope3/src/zope/app/services/tests/test_connectionconfiguration.py:1.12	Tue Jun  3 17:43:00 2003
+++ Zope3/src/zope/app/services/tests/test_connectionconfiguration.py	Tue Jun  3 18:46:22 2003
@@ -16,13 +16,11 @@
 $Id$
 """
 __metaclass__ = type
-from unittest import TestCase, main, makeSuite
 
+from unittest import TestCase, main, makeSuite
 from zope.app.services.connection import ConnectionConfiguration
-
 from zope.app.services.tests.placefulsetup import PlacefulSetup
 from zope.app.traversing import traverse
-from zope.app.services.service import ServiceManager
 from zope.app.container.zopecontainer import ZopeContainerAdapter
 from zope.app.interfaces.services.configuration import Active, Unregistered
 from zope.app.interfaces.rdb import IZopeDatabaseAdapter


=== Zope3/src/zope/app/services/tests/test_connectionservice.py 1.9 => 1.10 ===
--- Zope3/src/zope/app/services/tests/test_connectionservice.py:1.9	Tue Jun  3 17:43:00 2003
+++ Zope3/src/zope/app/services/tests/test_connectionservice.py	Tue Jun  3 18:46:22 2003
@@ -17,25 +17,15 @@
 
 import unittest
 
-from zope.app.attributeannotations import AttributeAnnotations
 from zope.app.container.zopecontainer import ZopeContainerAdapter
-from zope.app.dependable import Dependable
-from zope.app.interfaces.annotation import IAnnotatable
-from zope.app.interfaces.annotation import IAnnotations
 from zope.app.interfaces.annotation import IAttributeAnnotatable
-from zope.app.interfaces.dependable import IDependable
-from zope.app.interfaces.dependable import IDependable
 from zope.app.interfaces.rdb import IZopeDatabaseAdapter
 from zope.app.interfaces.services.configuration import Active, Registered
 from zope.app.interfaces.services.configuration \
-     import IAttributeUseConfigurable, IUseConfiguration
-from zope.app.services.configuration import UseConfiguration
+     import IAttributeUseConfigurable
 from zope.app.services.connection import ConnectionConfiguration
 from zope.app.services.connection import ConnectionService
-from zope.app.services.service import ServiceManager
 from zope.app.services.tests.placefulsetup import PlacefulSetup
-from zope.app.traversing import traverse
-from zope.component.adapter import provideAdapter
 from zope.app.tests import setup
 from zope.app import zapi
 
@@ -75,13 +65,13 @@
 
         k = self.cm.setObject('', ConnectionConfiguration('conn1',
                                 '/++etc++site/default/da1'))
-        traverse(self.default.getConfigurationManager(), k).status = Active
+        zapi.traverse(self.default.getConfigurationManager(), k).status = Active
         k = self.cm.setObject('', ConnectionConfiguration('conn2',
                                 '/++etc++site/default/da2'))
-        traverse(self.default.getConfigurationManager(), k).status = Active
+        zapi.traverse(self.default.getConfigurationManager(), k).status = Active
         k = self.cm.setObject('', ConnectionConfiguration('conn3',
                                 '/++etc++site/default/da1'))
-        traverse(self.default.getConfigurationManager(),
+        zapi.traverse(self.default.getConfigurationManager(),
                  k).status = Registered
         # Now self.service has conn1 and conn2 available and knows about conn3
 
@@ -89,7 +79,7 @@
         self.service1 = setup.addService(sm, 'SQLDatabaseConnections',
                                          ConnectionServiceForTests())
 
-        default1 = traverse(sm, 'default')
+        default1 = zapi.traverse(sm, 'default')
         default1.setObject('da3', DAStub(3))
         default1.setObject('da4', DAStub(4))
         
@@ -97,10 +87,10 @@
 
         k = cm1.setObject('', ConnectionConfiguration('conn1',
                             '/folder1/++etc++site/default/da3'))
-        traverse(default1.getConfigurationManager(), k).status = Active
+        zapi.traverse(default1.getConfigurationManager(), k).status = Active
         k = cm1.setObject('', ConnectionConfiguration('conn4',
                             '/folder1/++etc++site/default/da4'))
-        traverse(default1.getConfigurationManager(), k).status = Active
+        zapi.traverse(default1.getConfigurationManager(), k).status = Active
         # Now self.service1 overrides conn1, adds new conn4 available, and
         # inherits conn2 from self.service
 


=== Zope3/src/zope/app/services/tests/test_eventservice.py 1.24 => 1.25 ===
--- Zope3/src/zope/app/services/tests/test_eventservice.py:1.24	Tue Jun  3 17:43:00 2003
+++ Zope3/src/zope/app/services/tests/test_eventservice.py	Tue Jun  3 18:46:22 2003
@@ -32,7 +32,6 @@
 from zope.app.interfaces.event import ISubscriber
 from zope.app.event.objectevent import ObjectAddedEvent, ObjectModifiedEvent
 from zope.app.interfaces.event import IEvent, ISubscribingAware
-from zope.app.interfaces.services.configuration import Active
 from zope.app.interfaces.services.configuration import Registered
 from zope.app.context import ContextWrapper
 from zope.app.services.tests.eventsetup import EventSetup


=== Zope3/src/zope/app/services/tests/test_module.py 1.7 => 1.8 ===
--- Zope3/src/zope/app/services/tests/test_module.py:1.7	Tue Jun  3 17:43:00 2003
+++ Zope3/src/zope/app/services/tests/test_module.py	Tue Jun  3 18:46:22 2003
@@ -16,10 +16,9 @@
 Revision information:
 $Id$
 """
-from unittest import TestCase, TestLoader, TextTestRunner
 
+from unittest import TestCase, TestLoader, TextTestRunner
 from zope.interface import Interface
-from zope.app.services.service import ServiceManager
 from zope.app.services.tests.placefulsetup import PlacefulSetup
 from zope.app.traversing import traverse
 from zope.app.services.module import Manager


=== Zope3/src/zope/app/services/tests/test_principalannotation.py 1.6 => 1.7 ===
--- Zope3/src/zope/app/services/tests/test_principalannotation.py:1.6	Tue Jun  3 17:43:00 2003
+++ Zope3/src/zope/app/services/tests/test_principalannotation.py	Tue Jun  3 18:46:22 2003
@@ -19,7 +19,7 @@
 from unittest import TestCase, TestLoader, TextTestRunner
 from zope.app.services.tests.placefulsetup \
     import PlacefulSetup
-from zope.component import getServiceManager, getService
+from zope.component import getServiceManager
 from zope.app.services.principalannotation import \
      PrincipalAnnotationService, AnnotationsForPrincipal
 from zope.app.interfaces.services.principalannotation import \


=== Zope3/src/zope/app/services/tests/test_roleservice.py 1.3 => 1.4 ===
--- Zope3/src/zope/app/services/tests/test_roleservice.py:1.3	Tue Jun  3 17:43:00 2003
+++ Zope3/src/zope/app/services/tests/test_roleservice.py	Tue Jun  3 18:46:22 2003
@@ -20,7 +20,7 @@
 from unittest import TestCase, TestLoader, TextTestRunner
 from zope.app.tests import setup
 from zope.app.services.tests.placefulsetup import PlacefulSetup
-from zope.component import getServiceManager, getService
+from zope.component import getServiceManager
 from zope.app.interfaces.security import IRoleService
 from zope.app.security.registries.roleregistry import roleRegistry
 from zope.app.services.role import RoleService


=== Zope3/src/zope/app/services/tests/test_serviceconfiguration.py 1.10 => 1.11 ===
--- Zope3/src/zope/app/services/tests/test_serviceconfiguration.py:1.10	Tue Jun  3 17:43:00 2003
+++ Zope3/src/zope/app/services/tests/test_serviceconfiguration.py	Tue Jun  3 18:46:22 2003
@@ -26,7 +26,6 @@
 from zope.app.traversing import traverse, getPath
 from zope.app.services.service import ServiceConfiguration
 from zope.app.services.tests.placefulsetup import PlacefulSetup
-from zope.app.services.service import ServiceManager
 from zope.component.service import defineService
 from zope.app.interfaces.services.service import IBindingAware
 from zope.app.interfaces.services.configuration import Active