[Zope3-checkins] CVS: Zope3/src/zope/app/services/tests - placefulsetup.py:1.8.2.1 test_cacheconfiguration.py:1.2.6.1 test_connectionconfiguration.py:1.2.6.1 test_connectionservice.py:1.2.6.1 test_serviceconfiguration.py:1.2.6.1
Tim Peters
tim.one@comcast.net
Tue, 25 Feb 2003 16:27:55 -0500
Update of /cvs-repository/Zope3/src/zope/app/services/tests
In directory cvs.zope.org:/tmp/cvs-serv10218/src/zope/app/services/tests
Modified Files:
Tag: use-config-branch
placefulsetup.py test_cacheconfiguration.py
test_connectionconfiguration.py test_connectionservice.py
test_serviceconfiguration.py
Log Message:
When you add a service, you're now automatically taken to its
configuration page (instead of needing to plow thru several other
pages first, finding the same service repeatedly). This doesn't
feel squeaky clean (to Tim), but appears to have the virtue of
working.
Also taught such unit tests as proved to need it about
IAttributeUseConfigurable, and yesterday's UseConfiguration adapter.
=== Zope3/src/zope/app/services/tests/placefulsetup.py 1.8 => 1.8.2.1 ===
--- Zope3/src/zope/app/services/tests/placefulsetup.py:1.8 Tue Feb 11 21:17:34 2003
+++ Zope3/src/zope/app/services/tests/placefulsetup.py Tue Feb 25 16:27:55 2003
@@ -38,6 +38,13 @@
from zope.app.traversing import traverse, getPhysicalPathString
from zope.app.services.service import ServiceManager, ServiceConfiguration
from zope.app.interfaces.services.configuration import Active
+from zope.app.interfaces.services.configuration import IAttributeUseConfigurable
+from zope.app.interfaces.services.configuration import IUseConfiguration
+from zope.app.services.configuration import UseConfiguration
+from zope.app.attributeannotations import AttributeAnnotations
+from zope.app.interfaces.annotation import IAttributeAnnotatable
+from zope.app.interfaces.annotation import IAnnotations
+
class PlacefulSetup(PlacelessSetup):
@@ -60,6 +67,11 @@
provideAdapter(
IContainmentRoot, IPhysicallyLocatable, RootPhysicallyLocatable)
+ provideAdapter(IAttributeUseConfigurable, IUseConfiguration,
+ UseConfiguration)
+ provideAdapter(IAttributeAnnotatable, IAnnotations,
+ AttributeAnnotations)
+
# set up etc namespace
provideNamespaceHandler("etc", etc)
@@ -175,7 +187,7 @@
raise RuntimeError('ServiceManager already exists, so cannot '
'create standard services')
root.setServiceManager(ServiceManager())
- from zope.component import getServiceManager
+ from zope.component import getServiceManager
defineService = getServiceManager(None).defineService
from zope.app.interfaces.services.hub import IObjectHub
=== Zope3/src/zope/app/services/tests/test_cacheconfiguration.py 1.2 => 1.2.6.1 ===
--- Zope3/src/zope/app/services/tests/test_cacheconfiguration.py:1.2 Wed Dec 25 09:13:20 2002
+++ Zope3/src/zope/app/services/tests/test_cacheconfiguration.py Tue Feb 25 16:27:55 2003
@@ -27,6 +27,7 @@
from zope.app.interfaces.dependable import IDependable
from zope.app.interfaces.cache.cache import ICachingService
from zope.app.interfaces.services.configuration import IConfigurable
+from zope.app.interfaces.services.configuration import IAttributeUseConfigurable
from zope.app.services.configuration import ConfigurationRegistry
from zope.app.services.service import ServiceConfiguration
from zope.proxy.context import ContextMethod
@@ -58,7 +59,8 @@
class CachingServiceStub(DependableStub):
- __implements__ = ICachingService, IConfigurable, IDependable
+ __implements__ = (ICachingService, IConfigurable, IDependable,
+ IAttributeUseConfigurable)
def __init__(self):
self.bindings = {}
=== Zope3/src/zope/app/services/tests/test_connectionconfiguration.py 1.2 => 1.2.6.1 ===
--- Zope3/src/zope/app/services/tests/test_connectionconfiguration.py:1.2 Wed Dec 25 09:13:20 2002
+++ Zope3/src/zope/app/services/tests/test_connectionconfiguration.py Tue Feb 25 16:27:55 2003
@@ -36,6 +36,7 @@
from zope.app.services.service import ServiceConfiguration
from zope.proxy.context import ContextMethod
from zope.proxy.context import ContextWrapper
+from zope.app.interfaces.services.configuration import IAttributeUseConfigurable
class DependableStub:
@@ -58,7 +59,8 @@
class ConnectionServiceStub(DependableStub):
- __implements__ = IConnectionService, IConfigurable, IDependable
+ __implements__ = (IConnectionService, IConfigurable, IDependable,
+ IAttributeUseConfigurable)
def __init__(self):
self.bindings = {}
=== Zope3/src/zope/app/services/tests/test_connectionservice.py 1.2 => 1.2.6.1 ===
--- Zope3/src/zope/app/services/tests/test_connectionservice.py:1.2 Wed Dec 25 09:13:20 2002
+++ Zope3/src/zope/app/services/tests/test_connectionservice.py Tue Feb 25 16:27:55 2003
@@ -42,11 +42,12 @@
import Active, Unregistered, Registered
from zope.app.services.connection \
import ConnectionConfiguration
+from zope.app.interfaces.services.configuration import IAttributeUseConfigurable
class ConnectionServiceForTests(ConnectionService):
- __implements__ = ConnectionService.__implements__, IAttributeAnnotatable
+ __implements__ = ConnectionService.__implements__, IAttributeUseConfigurable
class DAStub:
=== Zope3/src/zope/app/services/tests/test_serviceconfiguration.py 1.2 => 1.2.6.1 ===
--- Zope3/src/zope/app/services/tests/test_serviceconfiguration.py:1.2 Wed Dec 25 09:13:20 2002
+++ Zope3/src/zope/app/services/tests/test_serviceconfiguration.py Tue Feb 25 16:27:55 2003
@@ -31,6 +31,7 @@
from zope.app.interfaces.services.service import IBindingAware
from zope.app.interfaces.services.configuration import Active, Unregistered
from zope.app.interfaces.services.configuration import Registered
+from zope.app.interfaces.services.configuration import IAttributeUseConfigurable
from zope.app.interfaces.dependable import IDependable
from zope.app.interfaces.dependable import DependencyError
@@ -42,7 +43,8 @@
pass
class TestService:
- __implements__ = ITestService, IBindingAware, IDependable
+ __implements__ = (ITestService, IBindingAware, IDependable,
+ IAttributeUseConfigurable)
_bound = _unbound = ()