[Zope3-checkins] CVS: Zope3/src/zope/app/services/tests -
test_surrogates.py:1.4
Jim Fulton
jim at zope.com
Mon Mar 8 12:27:26 EST 2004
Update of /cvs-repository/Zope3/src/zope/app/services/tests
In directory cvs.zope.org:/tmp/cvs-serv4511/src/zope/app/services/tests
Modified Files:
test_surrogates.py
Log Message:
Removed the old adapter registry code.
Renamed the surrogate registry to AdapterRegistry and moved the
surrogate code to zope.interface.adapter.
Removed the old surrogate module.
=== Zope3/src/zope/app/services/tests/test_surrogates.py 1.3 => 1.4 ===
--- Zope3/src/zope/app/services/tests/test_surrogates.py:1.3 Fri Feb 20 11:57:32 2004
+++ Zope3/src/zope/app/services/tests/test_surrogates.py Mon Mar 8 12:26:55 2004
@@ -16,9 +16,9 @@
Local surrogates and surrogate registries share declarations with
those "above" them.
- Suppose we have a global SurrogateRegistry:
+ Suppose we have a global AdapterRegistry:
- >>> G = SurrogateRegistry()
+ >>> G = AdapterRegistry()
we also have a local surrogate registry, with G as it's base:
@@ -178,9 +178,9 @@
def test_named_adapters():
"""
- Suppose we have a global SurrogateRegistry:
+ Suppose we have a global AdapterRegistry:
- >>> G = SurrogateRegistry()
+ >>> G = AdapterRegistry()
we also have a local surrogate registry, with G as it's base:
@@ -356,9 +356,9 @@
def test_multi_adapters():
"""
- Suppose we have a global SurrogateRegistry:
+ Suppose we have a global AdapterRegistry:
- >>> G = SurrogateRegistry()
+ >>> G = AdapterRegistry()
we also have a local surrogate registry, with G as it's base:
@@ -524,7 +524,7 @@
>>> db = DB()
>>> conn1 = db.open()
- >>> G = globalSurrogateRegistry
+ >>> G = globalAdapterRegistry
>>> L1 = LocalSurrogateRegistry(G)
>>> L2 = LocalSurrogateRegistry(G, L1)
@@ -730,7 +730,7 @@
def test_local_default():
"""
- >>> G = SurrogateRegistry()
+ >>> G = AdapterRegistry()
>>> L1 = LocalSurrogateRegistry(G)
>>> r = Registration(required = None, provided=IB1, factory=Adapter)
>>> L1.createRegistrationsFor(r).activate(r)
@@ -742,7 +742,7 @@
def test_changing_next():
"""
- >>> G = SurrogateRegistry()
+ >>> G = AdapterRegistry()
>>> L1 = LocalSurrogateRegistry(G)
>>> L2 = LocalSurrogateRegistry(G, L1)
>>> f2 = F2()
@@ -883,7 +883,7 @@
import unittest
from zope.testing.doctestunit import DocTestSuite
-from zope.interface.surrogate import SurrogateRegistry
+from zope.interface.adapter import AdapterRegistry
from zope.app.services.surrogate import LocalSurrogateRegistry
from zope.app.services.surrogate import LocalSurrogateBasedService
import zope.interface
@@ -962,11 +962,11 @@
# Create a picklable global registry. The pickleability of other
# global surrogate registries is beyond the scope of these tests:
-class GlobalSurogateRegistry(SurrogateRegistry):
+class GlobalAdapterRegistry(AdapterRegistry):
def __reduce__(self):
- return 'globalSurrogateRegistry'
+ return 'globalAdapterRegistry'
-globalSurrogateRegistry = GlobalSurogateRegistry()
+globalAdapterRegistry = GlobalAdapterRegistry()
class TestStack:
registration = None
More information about the Zope3-Checkins
mailing list