[Zope3-checkins] CVS: Zope3/src/zope/app/services/tests - test_connectionservice.py:1.7
Guido van Rossum
guido@python.org
Wed, 23 Apr 2003 20:20:45 -0400
Update of /cvs-repository/Zope3/src/zope/app/services/tests
In directory cvs.zope.org:/tmp/cvs-serv15320
Modified Files:
test_connectionservice.py
Log Message:
Fix test breakage. Also sort imports, fold long lines, and unfold
short lines.
=== Zope3/src/zope/app/services/tests/test_connectionservice.py 1.6 => 1.7 ===
--- Zope3/src/zope/app/services/tests/test_connectionservice.py:1.6 Sun Mar 23 17:35:42 2003
+++ Zope3/src/zope/app/services/tests/test_connectionservice.py Wed Apr 23 20:20:44 2003
@@ -16,38 +16,34 @@
"""
import unittest
-from zope.app.traversing import traverse
-from zope.app.interfaces.rdb import IZopeConnection
-from zope.app.interfaces.rdb import IZopeDatabaseAdapter
-from zope.app.interfaces.rdb import \
- IConnectionService
+
+from zope.app.attributeannotations import AttributeAnnotations
from zope.app.container.zopecontainer import ZopeContainerAdapter
-from zope.app.services.connection import \
- ConnectionService
-from zope.app.services.service \
- import ServiceManager
-from zope.app.services.service \
- import ServiceConfiguration
-from zope.app.interfaces.dependable import IDependable
-from zope.app.services.tests.placefulsetup \
- import PlacefulSetup
+from zope.app.dependable import Dependable
from zope.app.interfaces.annotation import IAnnotatable
-from zope.app.interfaces.annotation import IAttributeAnnotatable
-from zope.app.attributeannotations import AttributeAnnotations
from zope.app.interfaces.annotation import IAnnotations
+from zope.app.interfaces.annotation import IAttributeAnnotatable
from zope.app.interfaces.dependable import IDependable
-from zope.app.dependable import Dependable
-from zope.component.adapter import provideAdapter
+from zope.app.interfaces.dependable import IDependable
+from zope.app.interfaces.rdb import IConnectionService
+from zope.app.interfaces.rdb import IZopeConnection
+from zope.app.interfaces.rdb import IZopeDatabaseAdapter
+from zope.app.interfaces.services.configuration import Active, Registered
from zope.app.interfaces.services.configuration \
- import Active, Unregistered, Registered
-from zope.app.services.connection \
- import ConnectionConfiguration
-from zope.app.interfaces.services.configuration import IAttributeUseConfigurable
-
+ import IAttributeUseConfigurable, IUseConfiguration
+from zope.app.services.configuration import UseConfiguration
+from zope.app.services.connection import ConnectionConfiguration
+from zope.app.services.connection import ConnectionService
+from zope.app.services.service import ServiceConfiguration
+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
class ConnectionServiceForTests(ConnectionService):
- __implements__ = ConnectionService.__implements__, IAttributeUseConfigurable
+ __implements__ = (ConnectionService.__implements__,
+ IAttributeUseConfigurable)
class DAStub:
@@ -73,6 +69,8 @@
provideAdapter(IAttributeAnnotatable,
IAnnotations, AttributeAnnotations)
provideAdapter(IAnnotatable, IDependable, Dependable)
+ provideAdapter(IAttributeAnnotatable, IUseConfiguration,
+ UseConfiguration)
# Set up a local connection service
self.buildFolders()
@@ -99,7 +97,8 @@
traverse(self.default.getConfigurationManager(), '3').status = Active
self.cm.setObject('', ConnectionConfiguration('conn3',
'/++etc++site/default/da1'))
- traverse(self.default.getConfigurationManager(), '4').status = Registered
+ traverse(self.default.getConfigurationManager(),
+ '4').status = Registered
# Now self.service has conn1 and conn2 available and knows about conn3
# Set up a more local connection service