[Zope3-Users] Adapting a builtin?

Paul Winkler pw_lists at slinkp.com
Tue Dec 13 10:12:33 EST 2005


On Tue, Dec 13, 2005 at 07:57:38AM +0100, Michael Howitz wrote:
> In unittests the ZCML-Directives are not used so you have to do the
> things from ZCML in your test-code before adaption.
> 
> from zope.interface import classImplements
> from zope.app.testing import ztapi
> 
> classImplements(str, IString)
> ztapi.provideAdapter(IString, IHTTPConnection, HTTPConnection)

Yes, that does the job. I better go read up on testing in z3.
Thanks!

-- 

Paul Winkler
http://www.slinkp.com


More information about the Zope3-users mailing list