[Zope3-checkins] CVS: Zope3/src/zope/app/services/pluggableauth/tests - test_pluggableauth.py:1.6.6.1

Jim Fulton cvs-admin at zope.org
Sun Nov 9 11:08:58 EST 2003


Update of /cvs-repository/Zope3/src/zope/app/services/pluggableauth/tests
In directory cvs.zope.org:/tmp/cvs-serv15349/src/zope/app/services/pluggableauth/tests

Modified Files:
      Tag: adaptergeddon-branch
	test_pluggableauth.py 
Log Message:
Created a global presentation service that replaces the 
global view, resource, and skin services.

Now look up presentation components by adapting from a request type,
rather than adapting to a presentation type.





=== Zope3/src/zope/app/services/pluggableauth/tests/test_pluggableauth.py 1.6 => 1.6.6.1 ===
--- Zope3/src/zope/app/services/pluggableauth/tests/test_pluggableauth.py:1.6	Sun Sep 21 13:33:05 2003
+++ Zope3/src/zope/app/services/pluggableauth/tests/test_pluggableauth.py	Sun Nov  9 11:08:27 2003
@@ -16,6 +16,7 @@
 """
 
 from unittest import TestCase, TestSuite, main, makeSuite
+from zope.app.tests import ztapi
 from zope.app.services.auth import User
 from zope.app.services.servicenames import Adapters
 from zope.app.services.tests import placefulsetup
@@ -23,7 +24,6 @@
 from zope.exceptions import NotFoundError
 from zope.publisher.interfaces.http import IHTTPCredentials
 from zope.app.tests import setup
-from zope.publisher.interfaces.browser import IBrowserPresentation
 from zope.exceptions import NotFoundError
 
 from zope.app.services.pluggableauth import BTreePrincipalSource, \
@@ -44,7 +44,6 @@
 class Setup(placefulsetup.PlacefulSetup, TestCase):
 
     def setUp(self):
-        from zope.component.view import viewService
         from zope.app.interfaces.services.pluggableauth import IPrincipalSource
         sm = placefulsetup.PlacefulSetup.setUp(self, site=True)
         from zope.component import getService
@@ -53,9 +52,8 @@
         getService(None, Adapters).provideAdapter(
             IHTTPCredentials, ILoginPassword, BasicAuthAdapter)
 
-        viewService.provideView(IPrincipalSource, "login",
-                                IBrowserPresentation,
-                                (PrincipalAuthenticationView,))
+        ztapi.browserView(IPrincipalSource, "login",
+                          (PrincipalAuthenticationView,))
 
         auth = setup.addService(sm, "TestPluggableAuthenticationService",
                                  PluggableAuthenticationService())




More information about the Zope3-Checkins mailing list