[Zope3-checkins] CVS: Zope3/src/zope/app/services/tests - test_auth.py:1.6

R. Sean Bowman sean.bowman@acm.org
Thu, 6 Feb 2003 01:50:29 -0500


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

Modified Files:
	test_auth.py 
Log Message:
finished changing service names to use strings defined in
zope/component/servicenames.py, changed the name of
ErrorReportingService to ErrorReports and Resources to ResourceService


=== Zope3/src/zope/app/services/tests/test_auth.py 1.5 => 1.6 ===
--- Zope3/src/zope/app/services/tests/test_auth.py:1.5	Fri Jan 31 06:03:32 2003
+++ Zope3/src/zope/app/services/tests/test_auth.py	Thu Feb  6 01:49:57 2003
@@ -20,6 +20,7 @@
      import AuthenticationService, DuplicateLogin, DuplicateId
 from zope.app.services.auth import User
 from zope.app.interfaces.services.auth import IUser
+from zope.component.servicenames import Adapters, Authentication
 
 from zope.exceptions import NotFoundError
 from zope.publisher.interfaces.http import IHTTPCredentials
@@ -53,7 +54,7 @@
         from zope.component import getService
         from zope.app.security.basicauthadapter import BasicAuthAdapter
         from zope.app.interfaces.security import ILoginPassword
-        getService(None, "Adapters").provideAdapter(
+        getService(None, Adapters).provideAdapter(
             IHTTPCredentials, ILoginPassword, BasicAuthAdapter)
 
         folder = self.rootFolder
@@ -66,7 +67,7 @@
         auth = traverse(default, key)
 
         path = getPhysicalPathString(auth)
-        configuration = ServiceConfiguration("Authentication", path)
+        configuration = ServiceConfiguration(Authentication, path)
         configure = traverse(default, 'configure')
         key = configure.setObject(None, configuration)
         traverse(configure, key).status = Active
@@ -88,8 +89,8 @@
              import principalRegistry
         from zope.app.interfaces.security import IAuthenticationService
         sm = getServiceManager(None)
-        sm.defineService("Authentication", IAuthenticationService)
-        sm.provideService("Authentication", principalRegistry)
+        sm.defineService(Authentication, IAuthenticationService)
+        sm.provideService(Authentication, principalRegistry)
 
 
 class AuthServiceTest(AuthSetup, TestCase):