[Zope3-checkins] CVS: Zope3/src/zope/app/browser/exception/tests - test_unauthorized.py:1.3.16.1

Grégoire Weber zope@i-con.ch
Sun, 22 Jun 2003 10:24:10 -0400


Update of /cvs-repository/Zope3/src/zope/app/browser/exception/tests
In directory cvs.zope.org:/tmp/cvs-serv24874/src/zope/app/browser/exception/tests

Modified Files:
      Tag: cw-mail-branch
	test_unauthorized.py 
Log Message:
Synced up with HEAD

=== Zope3/src/zope/app/browser/exception/tests/test_unauthorized.py 1.3 => 1.3.16.1 ===
--- Zope3/src/zope/app/browser/exception/tests/test_unauthorized.py:1.3	Mon Mar 24 04:02:07 2003
+++ Zope3/src/zope/app/browser/exception/tests/test_unauthorized.py	Sun Jun 22 10:22:39 2003
@@ -19,11 +19,12 @@
 
 from unittest import TestCase, main, makeSuite
 from zope.publisher.browser import TestRequest
-from zope.proxy.context import ContextWrapper
+from zope.app.context import ContextWrapper
 from zope.app.interfaces.security import IAuthenticationService, IPrincipal
+from zope.interface import implements
 
 class DummyPrincipal:
-    __implements__ = IPrincipal  # this is a lie
+    implements(IPrincipal)  # this is a lie
 
     def __init__(self, id):
         self.id = id
@@ -32,7 +33,7 @@
         return self.id
 
 class DummyAuthService:
-    __implements__ = IAuthenticationService  # this is a lie
+    implements(IAuthenticationService)  # this is a lie
 
     def unauthorized(self, principal_id, request):
         self.principal_id = principal_id
@@ -49,7 +50,7 @@
             pass
         request = TestRequest('/')
         authservice = DummyAuthService()
-        request.user = ContextWrapper(DummyPrincipal(23), authservice)
+        request.setUser(ContextWrapper(DummyPrincipal(23), authservice))
         u = Unauthorized(exception, request)
         u.issueChallenge()