[Zope-Checkins] CVS: Zope3/lib/python/Zope/App/Formulator/Widgets/Browser/tests - testBrowserWidget.py:1.1.2.3 testTextWidget.py:1.1.2.2

Stephan Richter srichter@cbu.edu
Wed, 27 Mar 2002 09:23:39 -0500


Update of /cvs-repository/Zope3/lib/python/Zope/App/Formulator/Widgets/Browser/tests
In directory cvs.zope.org:/tmp/cvs-serv9605/Widgets/Browser/tests

Modified Files:
      Tag: Zope-3x-branch
	testBrowserWidget.py testTextWidget.py 
Log Message:
Major changes in Formulator (for details see
srichter-OFS_Formulator-branch checkins):

- Created simple registries for validators, fields and so on.
- Made Formulator compatible with new Publisher code
- Adjusted for better usibility.

Note: More to come as Formulaot is bring developed.
 


=== Zope3/lib/python/Zope/App/Formulator/Widgets/Browser/tests/testBrowserWidget.py 1.1.2.2 => 1.1.2.3 ===
     def testRendering(self):
 
-        self.assertEqual(self._widget.render(),
+
+        request = {'field_foo': 'Foo Value'}
+
+        self.assertEqual(self._widget.render(request),
                          '<input type="text" name="field_foo" '
                          'value="Foo Value"  />')
 
-        self.assertEqual(self._widget.render_hidden(),
+        self.assertEqual(self._widget.render_hidden(request),
                          '<input type="hidden" name="field_foo" '
                          'value="Foo Value"  />')
 
         self._widget.extra = '''style="color: red"'''
-        self.assertEqual(self._widget.render_hidden(),
+        self.assertEqual(self._widget.render_hidden(request),
                          '<input type="hidden" name="field_foo" '
                          'value="Foo Value" style="color: red" />')
 


=== Zope3/lib/python/Zope/App/Formulator/Widgets/Browser/tests/testTextWidget.py 1.1.2.1 => 1.1.2.2 ===
     def testRendering(self):
 
-        self.assertNotEqual(self._widget.render(), '')
+        request = {'field_foo': 'Foo Value'}
 
-        self.assertNotEqual(self._widget.render_hidden(), '')
+        self.assertNotEqual(self._widget.render(request), '')
+
+        self.assertNotEqual(self._widget.render_hidden(request), '')
 
         self._widget.extra = '''style="color: red"'''
-        self.assertNotEqual(self._widget.render_hidden(), '')
+        self.assertNotEqual(self._widget.render_hidden(request), '')