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

Stephan Richter srichter at cosmos.phy.tufts.edu
Tue Aug 12 16:15:00 EDT 2003


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

Modified Files:
	test_unauthorized.py 
Log Message:
Internationalized Exception Views


=== Zope3/src/zope/app/browser/exception/tests/test_unauthorized.py 1.8 => 1.9 ===
--- Zope3/src/zope/app/browser/exception/tests/test_unauthorized.py:1.8	Fri Jul 18 10:00:20 2003
+++ Zope3/src/zope/app/browser/exception/tests/test_unauthorized.py	Tue Aug 12 15:14:56 2003
@@ -22,6 +22,16 @@
 from zope.app.context import ContextWrapper
 from zope.app.interfaces.security import IAuthenticationService, IPrincipal
 from zope.interface import implements
+from zope.app.browser.exception.unauthorized import Unauthorized
+
+
+class Unauthorized(Unauthorized):
+    """Unusually done by ZCML."""
+
+    def __init__(self, context, request):
+        self.context = context
+        self.request = request
+
 
 class DummyPrincipal:
     implements(IPrincipal)  # this is a lie
@@ -45,7 +55,6 @@
 class Test(TestCase):
 
     def test(self):
-        from zope.app.browser.exception.unauthorized import Unauthorized
         exception = Exception()
         try:
             raise exception
@@ -65,7 +74,6 @@
         self.assertEqual(authservice.principal_id, 23)
 
     def testPluggableAuthService(self):
-        from zope.app.browser.exception.unauthorized import Unauthorized
         exception = Exception()
         try:
             raise exception




More information about the Zope3-Checkins mailing list