[Zope3-Users] Registering adapter for ListSequence widget in tests

2006-09-05 Thread Darryl Cousins
Hi, I am having problems registering ListSequence widget, the following from my doctest: Although most widget adapters are registered in tfws.form.browser testing I had a lot of trouble with ListSequenceWidget - here I keep trying until I get it. This is the error raised when running the test::

Re: [Zope3-Users] Registering adapter for ListSequence widget in tests

2006-09-05 Thread TAHARA Yusei
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/listi

Re: [Zope3-Users] Registering adapter for ListSequence widget in tests

2006-09-06 Thread Stephan Richter
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 IL

Re: [Zope3-Users] Registering adapter for ListSequence widget in tests

2006-09-06 Thread Darryl Cousins
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