[Zope3-checkins] CVS: Zope3/src/zope/app/browser/form/tests - test_vocabularywidget.py:1.3
Fred L. Drake, Jr.
fred@zope.com
Wed, 21 May 2003 20:39:34 -0400
Update of /cvs-repository/Zope3/src/zope/app/browser/form/tests
In directory cvs.zope.org:/tmp/cvs-serv24126/tests
Modified Files:
test_vocabularywidget.py
Log Message:
Clean up the query view helpers for simple iterable vocabularies so they
work more reasonably for both single- and multi-selection vocabulary fields.
=== Zope3/src/zope/app/browser/form/tests/test_vocabularywidget.py 1.2 => 1.3 ===
--- Zope3/src/zope/app/browser/form/tests/test_vocabularywidget.py:1.2 Tue May 20 12:10:28 2003
+++ Zope3/src/zope/app/browser/form/tests/test_vocabularywidget.py Wed May 21 20:39:33 2003
@@ -27,6 +27,7 @@
from zope.schema.interfaces import IVocabulary, ITerm, IVocabularyQuery
from zope.schema.interfaces import IVocabularyField, IVocabularyMultiField
+from zope.schema.interfaces import IIterableVocabularyQuery
from zope.schema import vocabulary
@@ -223,6 +224,10 @@
"field-edit-widget",
IBrowserPresentation,
vocabularywidget.VocabularyEditWidget)
+ provideView(IIterableVocabularyQuery,
+ "widget-query-helper",
+ IBrowserPresentation,
+ vocabularywidget.IterableVocabularyQueryView)
# The following widget registration supports the specific
# sample vocabulary we're using, used to demonstrate how to
# override widget selection based on vocabulary:
@@ -255,6 +260,10 @@
"field-edit-multi-widget",
IBrowserPresentation,
vocabularywidget.VocabularyMultiEditWidget)
+ provideView(IIterableVocabularyQuery,
+ "widget-query-multi-helper",
+ IBrowserPresentation,
+ vocabularywidget.IterableVocabularyQueryMultiView)
# The following widget registration supports the specific
# sample vocabulary we're using, used to demonstrate how to
# override widget selection based on vocabulary: