[Zope3-checkins] CVS: Zope3/src/zope/app/browser/form/tests - test_vocabularywidget.py:1.21

Fred L. Drake, Jr. fred@zope.com
Fri, 6 Jun 2003 15:24:32 -0400


Update of /cvs-repository/Zope3/src/zope/app/browser/form/tests
In directory cvs.zope.org:/tmp/cvs-serv7277/tests

Modified Files:
	test_vocabularywidget.py 
Log Message:
Lots of cleanup.  Remove all use of the vocabulary "multi" field;
that should only be used as a base for concrete types.

Allow the single-selection display widget to deal with missing values.


=== Zope3/src/zope/app/browser/form/tests/test_vocabularywidget.py 1.20 => 1.21 ===
--- Zope3/src/zope/app/browser/form/tests/test_vocabularywidget.py:1.20	Fri Jun  6 11:17:18 2003
+++ Zope3/src/zope/app/browser/form/tests/test_vocabularywidget.py	Fri Jun  6 15:24:31 2003
@@ -28,10 +28,9 @@
 from zope.publisher.interfaces.browser import IBrowserPresentation
 
 from zope.schema.interfaces import IVocabulary, IVocabularyQuery
-from zope.schema.interfaces import IVocabularyField, IVocabularyMultiField
-from zope.schema.interfaces import IVocabularyListField
+from zope.schema.interfaces import IVocabularyField, IVocabularyListField
 from zope.schema.interfaces import IIterableVocabularyQuery
-from zope.schema.interfaces import IVocabularyTokenized, ITokenizedTerm
+from zope.schema.interfaces import IVocabularyTokenized
 from zope.schema import vocabulary
 
 
@@ -190,19 +189,19 @@
         # This is equivalent to the default configuration for
         # vocabulary field view registration from configure.zcml.
         # Multi-selection views only.
-        provideView(IVocabularyMultiField,
+        provideView(IVocabularyListField,
                     "display",
                     IBrowserPresentation,
-                    vocabularywidget.VocabularyMultiFieldDisplayWidget)
+                    vocabularywidget.VocabularyListFieldDisplayWidget)
         provideView(IVocabularyListField,
                     "edit",
                     IBrowserPresentation,
                     vocabularywidget.VocabularyListFieldEditWidget)
         # Bind widgets to the vocabulary fields:
         provideView(IVocabularyTokenized,
-                    "field-display-multi-widget",
+                    "field-display-list-widget",
                     IBrowserPresentation,
-                    vocabularywidget.VocabularyMultiDisplayWidget)
+                    vocabularywidget.VocabularyListDisplayWidget)
         provideView(IVocabularyTokenized,
                     "field-edit-list-widget",
                     IBrowserPresentation,
@@ -215,7 +214,7 @@
         # sample vocabulary we're using, used to demonstrate how to
         # override widget selection based on vocabulary:
         provideView(ISampleVocabulary,
-                    "field-display-multi-widget",
+                    "field-display-list-widget",
                     IBrowserPresentation,
                     SampleDisplayWidget)