[Zope3-checkins] CVS: Zope3/src/zope/app/utilities/tests - test_session.py:1.1.2.5

Stuart Bishop zen at shangri-la.dropbear.id.au
Mon Feb 9 00:10:12 EST 2004


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

Modified Files:
      Tag: ozzope-session-branch
	test_session.py 
Log Message:
About to migrate to HEAD


=== Zope3/src/zope/app/utilities/tests/test_session.py 1.1.2.4 => 1.1.2.5 ===
--- Zope3/src/zope/app/utilities/tests/test_session.py:1.1.2.4	Sun Feb  8 22:48:22 2004
+++ Zope3/src/zope/app/utilities/tests/test_session.py	Mon Feb  9 00:10:11 2004
@@ -18,16 +18,16 @@
 
 import unittest, doctest
 from zope.app import zapi
-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.services.utility import LocalUtilityService
+from zope.app.services.servicenames import Utilities
 from zope.app.interfaces.annotation import IAttributeAnnotatable
 
 from zope.app.interfaces.utilities.session import \
-        IBrowserId, IBrowserIdManager, ISession, ISessionDataContainer, \
-        BrowserIdManager
+        IBrowserId, IBrowserIdManager, ISession, ISessionDataContainer
 
 from zope.app.utilities.session import \
         CookieBrowserIdManager, Session, getSession, \
@@ -186,11 +186,12 @@
     >>> root = setup.placefulSetUp(site=True)
     >>> setup.createStandardServices(root)
     >>> sm = setup.createServiceManager(root)
+    >>> us = setup.addService(sm, Utilities, LocalUtilityService())
     >>> idmanager = CookieBrowserIdManager()
     >>> zope.interface.directlyProvides(idmanager,
     ...                                 IAttributeAnnotatable, ILocalUtility)
     >>> bim = setup.addUtility(
-    ...     sm, BrowserIdManager, IBrowserIdManager, idmanager, 'test')
+    ...     sm, '', IBrowserIdManager, idmanager, 'test')
     >>> pdc = PersistentSessionDataContainer()
     >>> zope.interface.directlyProvides(pdc,
     ...                                 IAttributeAnnotatable, ILocalUtility)
@@ -202,7 +203,7 @@
     Make sure we can access utilities
 
     >>> sdc = zapi.getUtility(root, ISessionDataContainer, 'persistent')
-    >>> bim = zapi.getUtility(root, IBrowserIdManager, BrowserIdManager)
+    >>> bim = zapi.getUtility(root, IBrowserIdManager)
 
     Make sure getSession works
 
@@ -227,6 +228,10 @@
     'red'
     >>> session2['color']
     'blue'
+
+    >>> setup.placefulTearDown()
+    >>> 'Thats all folks!'
+    'Thats all folks!'
     """
 
 def test_suite():




More information about the Zope3-Checkins mailing list