[Zope3-checkins] CVS: Zope3/src/zope/app/utilities/tests -
test_session.py:1.1.2.4
Jim Fulton
jim at zope.com
Sun Feb 8 22:48:23 EST 2004
Update of /cvs-repository/Zope3/src/zope/app/utilities/tests
In directory cvs.zope.org:/tmp/cvs-serv3068
Modified Files:
Tag: ozzope-session-branch
test_session.py
Log Message:
Modified test to declare interfaces that were declared in the config
file.
=== Zope3/src/zope/app/utilities/tests/test_session.py 1.1.2.3 => 1.1.2.4 ===
--- Zope3/src/zope/app/utilities/tests/test_session.py:1.1.2.3 Sun Feb 8 22:27:13 2004
+++ Zope3/src/zope/app/utilities/tests/test_session.py Sun Feb 8 22:48:22 2004
@@ -21,6 +21,9 @@
from zope.app.tests import placelesssetup
from zope.app.tests import ztapi
from zope.app.tests import setup
+import zope.interface
+from zope.app.interfaces.services.utility import ILocalUtility
+from zope.app.interfaces.annotation import IAttributeAnnotatable
from zope.app.interfaces.utilities.session import \
IBrowserId, IBrowserIdManager, ISession, ISessionDataContainer, \
@@ -183,9 +186,14 @@
>>> root = setup.placefulSetUp(site=True)
>>> setup.createStandardServices(root)
>>> sm = setup.createServiceManager(root)
+ >>> idmanager = CookieBrowserIdManager()
+ >>> zope.interface.directlyProvides(idmanager,
+ ... IAttributeAnnotatable, ILocalUtility)
>>> bim = setup.addUtility(
- ... sm, BrowserIdManager, IBrowserIdManager, CookieBrowserIdManager())
+ ... sm, BrowserIdManager, IBrowserIdManager, idmanager, 'test')
>>> pdc = PersistentSessionDataContainer()
+ >>> zope.interface.directlyProvides(pdc,
+ ... IAttributeAnnotatable, ILocalUtility)
>>> sdc = setup.addUtility(sm, 'persistent', ISessionDataContainer, pdc)
>>> sdc = setup.addUtility(sm, 'products.foo',ISessionDataContainer, pdc)
>>> sdc = setup.addUtility(sm, 'products.bar', ISessionDataContainer, pdc)
More information about the Zope3-Checkins
mailing list