Index: src/zope/app/exception/browser/tests/test_unauthorized.py =================================================================== --- src/zope/app/exception/browser/tests/test_unauthorized.py (revision 98908) +++ src/zope/app/exception/browser/tests/test_unauthorized.py (working copy) @@ -17,13 +17,14 @@ """ from unittest import TestCase, main, makeSuite from zope import component, interface -import zope.formlib.namedtemplate +import z3c.template.interfaces from zope.publisher.browser import TestRequest from zope.authentication.interfaces import IAuthentication from zope.security.interfaces import IPrincipal from zope.app.testing import ztapi from zope.app.exception.browser.unauthorized import Unauthorized from zope.app.testing.placelesssetup import PlacelessSetup +import zope.publisher.interfaces.browser class DummyPrincipal(object): interface.implements(IPrincipal) # this is a lie @@ -47,13 +48,14 @@ class DummyTemplate (object): - def __init__(self, context): + def __init__(self, context, request): self.context = context - component.adapts(Unauthorized) - interface.implements(zope.formlib.namedtemplate.INamedTemplate) + component.adapts(Unauthorized, + zope.publisher.interfaces.browser.IDefaultBrowserLayer) + interface.implements(z3c.template.interfaces.IContentTemplate) - def __call__(self): + def __call__(self, view): return 'You are not authorized' class Test(PlacelessSetup, TestCase): Index: src/zope/app/exception/browser/configure.zcml =================================================================== --- src/zope/app/exception/browser/configure.zcml (revision 98908) +++ src/zope/app/exception/browser/configure.zcml (working copy) @@ -1,5 +1,6 @@ - + + Index: setup.py =================================================================== --- setup.py (revision 98912) +++ setup.py (working copy) @@ -61,8 +61,7 @@ ]), install_requires=['setuptools', 'zope.app.pagetemplate', - # This is a dependency we can avaid: - 'zope.formlib', + 'z3c.template', 'zope.interface', 'zope.publisher', ],