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

Philipp von Weitershausen philikon at philikon.de
Fri Jan 16 08:38:49 EST 2004


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

Modified Files:
	test_add.py 
Log Message:
Changes to the schema package and the widget machinery (see
http://mail.zope.org/pipermail/zope3-dev/2004-January/009265.html):

- Widgets requiring key_type and/or value_type arguments will now check
  whether they implement IField. Before, anything was accepted although
  a field instance was implied. A key_type/value_type of None implies no
  validation of the key/value.

- Basic fields like TextLine, Int, Float, Date, and Datetime are not
  enumerated fields anymore. There are separate Enumerated* fields for
  that purpose now. Extra widgets for that functionality were added
  and configured.


=== Zope3/src/zope/app/browser/form/tests/test_add.py 1.23 => 1.24 ===
--- Zope3/src/zope/app/browser/form/tests/test_add.py:1.23	Sun Dec  7 05:04:50 2003
+++ Zope3/src/zope/app/browser/form/tests/test_add.py	Fri Jan 16 08:38:19 2004
@@ -28,7 +28,7 @@
 from zope.app.browser.form.add import AddViewFactory, AddView
 from zope.app.browser.form.metaconfigure import AddFormDirective
 from zope.app.interfaces.container import IAdding
-from zope.app.form.widget import CustomWidget
+from zope.app.form.widget import CustomWidgetFactory
 from zope.app.browser.form.widget import TextWidget as Text
 from zope.app.tests.placelesssetup import PlacelessSetup
 from zope.app.browser.form.submit import Update
@@ -64,17 +64,17 @@
     def setfoo(self, v): self._foo = v
 
 class V:
-    name_widget = CustomWidget(Text)
-    first_widget = CustomWidget(Text)
-    last_widget = CustomWidget(Text)
-    email_widget = CustomWidget(Text)
-    address_widget = CustomWidget(Text)
-    getfoo_widget = CustomWidget(Text)
-    extra1_widget = CustomWidget(Text)
-    extra2_widget = CustomWidget(Text)
+    name_widget = CustomWidgetFactory(Text)
+    first_widget = CustomWidgetFactory(Text)
+    last_widget = CustomWidgetFactory(Text)
+    email_widget = CustomWidgetFactory(Text)
+    address_widget = CustomWidgetFactory(Text)
+    getfoo_widget = CustomWidgetFactory(Text)
+    extra1_widget = CustomWidgetFactory(Text)
+    extra2_widget = CustomWidgetFactory(Text)
 
 class FooV:
-    bar_widget = CustomWidget(Text)
+    bar_widget = CustomWidgetFactory(Text)
 
 
 class SampleData:




More information about the Zope3-Checkins mailing list