Re: [Zope3-Users] Registering adapter for ListSequence widget in tests
Cheers Stephan, Yup. I added: >>> provideAdapter(CollectionInputWidget,[ISequence, \ ...IBrowserRequest], \ ...IInputWidget) To the test and now more form can be rendered in the doctest. Many thanks, Darryl On Wed, 2006-09-06 at 06:58 -0400, Stephan Richter wrote: > On Wednesday 06 September 2006 00:55, Darryl Cousins wrote: > > Following test setup formula in zope.app.form.browser I get this: > > > > >>> provideAdapter(ListSequenceWidget,[IList,IField,IBrowserRequest], \ > > ...IInputWidget,) > > You need a second adapter adapting just IList to IInputWidget. Here is what > the configuration of zope.app.form.browser does: > > type="zope.publisher.interfaces.browser.IBrowserRequest" > for="zope.schema.interfaces.ISequence" > provides="zope.app.form.interfaces.IInputWidget" > factory=".CollectionInputWidget" > permission="zope.Public" > /> > > Regards, > Stephan ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
Re: [Zope3-Users] Registering adapter for ListSequence widget in tests
On Wednesday 06 September 2006 00:55, Darryl Cousins wrote: > Following test setup formula in zope.app.form.browser I get this: > > >>> provideAdapter(ListSequenceWidget,[IList,IField,IBrowserRequest], \ > ... IInputWidget,) You need a second adapter adapting just IList to IInputWidget. Here is what the configuration of zope.app.form.browser does: Regards, Stephan -- Stephan Richter CBU Physics & Chemistry (B.S.) / Tufts Physics (Ph.D. student) Web2k - Web Software Design, Development and Training ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
Re: [Zope3-Users] Registering adapter for ListSequence widget in tests
Hi. I think you should use zope.app.testing.ztapi.provideAdapter instead. See zope/app/form/browser/tests/test_objectwidget.py, this is a good example. -- TAHARA Yusei ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users