[Zope3-checkins] CVS: Zope3/lib/python/Zope/App/Forms/Views/Browser/tests - testFormView.py:1.11 testListWidget.py:1.3 testMultiCheckboxWidget.py:1.3 testMultiListWidget.py:1.3 testRadioWidget.py:1.3

Stephan Richter srichter@cbu.edu
Wed, 24 Jul 2002 06:53:49 -0400


Update of /cvs-repository/Zope3/lib/python/Zope/App/Forms/Views/Browser/tests
In directory cvs.zope.org:/tmp/cvs-serv1557/lib/python/Zope/App/Forms/Views/Browser/tests

Modified Files:
	testFormView.py testListWidget.py testMultiCheckboxWidget.py 
	testMultiListWidget.py testRadioWidget.py 
Log Message:
Made some bug fixes and some changes. "items" for the ItemWidgets no expect
a list of (value, description) instead of (description, value) as it was in 
Formulator. This way we can make better use of dict.items().


=== Zope3/lib/python/Zope/App/Forms/Views/Browser/tests/testFormView.py 1.10 => 1.11 ===
     def testRenderField(self):
         field = SchemaTestObject.STestObject.getDescriptionFor('id')
         self.assertEqual(
-            '<input name="field_id" type="text" value="1" size="20"  />',
+            '<input name="field_id" type="text" value="5" size="20"  />',
             self._form.renderField(field))
 
         field = SchemaTestObject.STestObject.getDescriptionFor('creator')
         self.assertEqual('<input name="field_creator" type="text" '
-                         'value="srichter@cbu.edu" size="30"  />',
+                         'value="strichter@yahoo.com" size="30"  />',
                          self._form.renderField(field))
 
 


=== Zope3/lib/python/Zope/App/Forms/Views/Browser/tests/testListWidget.py 1.2 => 1.3 ===
 class Field:
     """Field Stub """
     id = 'foo'
-    items = [('Foo', 'foo'), ('Bar', 'bar')]
+    items = [('foo', 'Foo'), ('bar', 'Bar')]
 
     def get(self, name):
         return getattr(self, name)


=== Zope3/lib/python/Zope/App/Forms/Views/Browser/tests/testMultiCheckboxWidget.py 1.2 => 1.3 ===
 class Field:
     """Field Stub """
     id = 'foo'
-    items = [('Foo', 'foo1'), ('Bar', 'bar1')]
+    items = [('foo1', 'Foo'), ('bar1', 'Bar')]
 
     def get(self, name):
         return getattr(self, name)


=== Zope3/lib/python/Zope/App/Forms/Views/Browser/tests/testMultiListWidget.py 1.2 => 1.3 ===
 class Field:
     """Field Stub """
     id = 'foo'
-    items = [('Foo', 'foo'), ('Bar', 'bar')]
+    items = [('foo', 'Foo'), ('bar', 'Bar')]
 
     def get(self, name):
         return getattr(self, name)


=== Zope3/lib/python/Zope/App/Forms/Views/Browser/tests/testRadioWidget.py 1.2 => 1.3 ===
 class Field:
     """Field Stub """
     id = 'foo'
-    items = [('Foo', 'foo1'), ('Bar', 'bar1')]
+    items = [('foo1', 'Foo'), ('bar1', 'Bar')]
 
     def get(self, name):
         return getattr(self, name)