[Zope3-checkins] CVS: Zope3/src/zope/app/browser/form/tests -
test_browserwidget.py:1.19.4.1
test_checkboxwidget.py:1.9.24.1 test_filewidget.py:1.7.24.1
test_listwidget.py:1.8.24.1 test_multicheckboxwidget.py:1.8.24.1
test_multilistwidget.py:1.8.24.1
test_passwordwidget.py:1.8.24.1 test_radiowidget.py:1.10.24.1
test_textareawidget.py:1.9.24.1 test_textwidget.py:1.7.24.1
Garrett Smith
garrett at mojave-corp.com
Sat Feb 7 23:36:42 EST 2004
Update of /cvs-repository/Zope3/src/zope/app/browser/form/tests
In directory cvs.zope.org:/tmp/cvs-serv29659/src/zope/app/browser/form/tests
Modified Files:
Tag: ozzope-widgets-branch
test_browserwidget.py test_checkboxwidget.py
test_filewidget.py test_listwidget.py
test_multicheckboxwidget.py test_multilistwidget.py
test_passwordwidget.py test_radiowidget.py
test_textareawidget.py test_textwidget.py
Log Message:
- Removed the use of getValue for widget attributes - using the attributes
directly.
- Changed type attribute of widgets to inputType - this will be clarified
further in the widget interfaces.
- Fixed some trivial whitespace issues.
=== Zope3/src/zope/app/browser/form/tests/test_browserwidget.py 1.19 => 1.19.4.1 ===
--- Zope3/src/zope/app/browser/form/tests/test_browserwidget.py:1.19 Tue Jan 20 15:15:26 2004
+++ Zope3/src/zope/app/browser/form/tests/test_browserwidget.py Sat Feb 7 23:36:10 2004
@@ -68,10 +68,10 @@
self.failIf(self._widget.hasInput())
def testProperties(self):
- self.assertEqual(self._widget.getValue('tag'), 'input')
- self.assertEqual(self._widget.getValue('type'), 'text')
- self.assertEqual(self._widget.getValue('cssClass'), '')
- self.assertEqual(self._widget.getValue('extra'), '')
+ self.assertEqual(self._widget.tag, 'input')
+ self.assertEqual(self._widget.inputType, 'text')
+ self.assertEqual(self._widget.cssClass, '')
+ self.assertEqual(self._widget.extra, '')
def testRender(self):
value = 'Foo Value'
=== Zope3/src/zope/app/browser/form/tests/test_checkboxwidget.py 1.9 => 1.9.24.1 ===
--- Zope3/src/zope/app/browser/form/tests/test_checkboxwidget.py:1.9 Wed Aug 13 17:28:04 2003
+++ Zope3/src/zope/app/browser/form/tests/test_checkboxwidget.py Sat Feb 7 23:36:10 2004
@@ -28,11 +28,11 @@
_WidgetFactory = CheckBoxWidget
def testProperties(self):
- self.assertEqual(self._widget.getValue('tag'), 'input')
- self.assertEqual(self._widget.getValue('type'), 'checkbox')
- self.assertEqual(self._widget.getValue('cssClass'), '')
- self.assertEqual(self._widget.getValue('extra'), '')
- self.assertEqual(self._widget.getValue('default'), 0)
+ self.assertEqual(self._widget.tag, 'input')
+ self.assertEqual(self._widget.inputType, 'checkbox')
+ self.assertEqual(self._widget.cssClass, '')
+ self.assertEqual(self._widget.extra, '')
+ self.assertEqual(self._widget.default, 0)
def testRender(self):
value = 1
=== Zope3/src/zope/app/browser/form/tests/test_filewidget.py 1.7 => 1.7.24.1 ===
--- Zope3/src/zope/app/browser/form/tests/test_filewidget.py:1.7 Wed Aug 13 17:28:04 2003
+++ Zope3/src/zope/app/browser/form/tests/test_filewidget.py Sat Feb 7 23:36:10 2004
@@ -33,13 +33,13 @@
self._widget.request.form['field.foo'] = file
def testProperties(self):
- self.assertEqual(self._widget.getValue('tag'), 'input')
- self.assertEqual(self._widget.getValue('type'), 'file')
- self.assertEqual(self._widget.getValue('cssClass'), '')
- self.assertEqual(self._widget.getValue('extra'), '')
- self.assertEqual(self._widget.getValue('default'), '')
- self.assertEqual(self._widget.getValue('displayWidth'), 20)
- self.assertEqual(self._widget.getValue('displayMaxWidth'), '')
+ self.assertEqual(self._widget.tag, 'input')
+ self.assertEqual(self._widget.inputType, 'file')
+ self.assertEqual(self._widget.cssClass, '')
+ self.assertEqual(self._widget.extra, '')
+ self.assertEqual(self._widget.default, '')
+ self.assertEqual(self._widget.displayWidth, 20)
+ self.assertEqual(self._widget.displayMaxWidth, '')
def testRender(self):
value = 'Foo Value'
=== Zope3/src/zope/app/browser/form/tests/test_listwidget.py 1.8 => 1.8.24.1 ===
--- Zope3/src/zope/app/browser/form/tests/test_listwidget.py:1.8 Wed Aug 13 17:28:04 2003
+++ Zope3/src/zope/app/browser/form/tests/test_listwidget.py Sat Feb 7 23:36:10 2004
@@ -28,10 +28,10 @@
_WidgetFactory = ListWidget
def testProperties(self):
- self.assertEqual(self._widget.getValue('cssClass'), "")
- self.assertEqual(self._widget.getValue('extra'), '')
- self.assertEqual(self._widget.getValue('firstItem'), 0)
- self.assertEqual(self._widget.getValue('size'), 5)
+ self.assertEqual(self._widget.cssClass, "")
+ self.assertEqual(self._widget.extra, '')
+ self.assertEqual(self._widget.firstItem, 0)
+ self.assertEqual(self._widget.size, 5)
def testRenderItem(self):
=== Zope3/src/zope/app/browser/form/tests/test_multicheckboxwidget.py 1.8 => 1.8.24.1 ===
--- Zope3/src/zope/app/browser/form/tests/test_multicheckboxwidget.py:1.8 Wed Aug 13 17:28:04 2003
+++ Zope3/src/zope/app/browser/form/tests/test_multicheckboxwidget.py Sat Feb 7 23:36:10 2004
@@ -28,9 +28,9 @@
self._widget.context.allowed_values = (u'foo', u'bar')
def testProperties(self):
- self.assertEqual(self._widget.getValue('cssClass'), "")
- self.assertEqual(self._widget.getValue('extra'), '')
- self.assertEqual(self._widget.getValue('orientation'), 'vertical')
+ self.assertEqual(self._widget.cssClass, "")
+ self.assertEqual(self._widget.extra, '')
+ self.assertEqual(self._widget.orientation, 'vertical')
def testRenderItem(self):
=== Zope3/src/zope/app/browser/form/tests/test_multilistwidget.py 1.8 => 1.8.24.1 ===
--- Zope3/src/zope/app/browser/form/tests/test_multilistwidget.py:1.8 Wed Aug 13 17:28:04 2003
+++ Zope3/src/zope/app/browser/form/tests/test_multilistwidget.py Sat Feb 7 23:36:10 2004
@@ -28,9 +28,9 @@
self._widget.context.allowed_values = (u'foo', u'bar')
def testProperties(self):
- self.assertEqual(self._widget.getValue('cssClass'), "")
- self.assertEqual(self._widget.getValue('extra'), '')
- self.assertEqual(self._widget.getValue('size'), 5)
+ self.assertEqual(self._widget.cssClass, "")
+ self.assertEqual(self._widget.extra, '')
+ self.assertEqual(self._widget.size, 5)
def testRenderItem(self):
=== Zope3/src/zope/app/browser/form/tests/test_passwordwidget.py 1.8 => 1.8.24.1 ===
--- Zope3/src/zope/app/browser/form/tests/test_passwordwidget.py:1.8 Wed Aug 13 17:28:04 2003
+++ Zope3/src/zope/app/browser/form/tests/test_passwordwidget.py Sat Feb 7 23:36:10 2004
@@ -25,13 +25,13 @@
_WidgetFactory = PasswordWidget
def testProperties(self):
- self.assertEqual(self._widget.getValue('tag'), 'input')
- self.assertEqual(self._widget.getValue('type'), 'password')
- self.assertEqual(self._widget.getValue('cssClass'), '')
- self.assertEqual(self._widget.getValue('extra'), '')
- self.assertEqual(self._widget.getValue('default'), '')
- self.assertEqual(self._widget.getValue('displayWidth'), 20)
- self.assertEqual(self._widget.getValue('displayMaxWidth'), '')
+ self.assertEqual(self._widget.tag, 'input')
+ self.assertEqual(self._widget.inputType, 'password')
+ self.assertEqual(self._widget.cssClass, '')
+ self.assertEqual(self._widget.extra, '')
+ self.assertEqual(self._widget.default, '')
+ self.assertEqual(self._widget.displayWidth, 20)
+ self.assertEqual(self._widget.displayMaxWidth, '')
def testRender(self):
value = 'Foo Value'
=== Zope3/src/zope/app/browser/form/tests/test_radiowidget.py 1.10 => 1.10.24.1 ===
--- Zope3/src/zope/app/browser/form/tests/test_radiowidget.py:1.10 Sat Aug 16 13:23:37 2003
+++ Zope3/src/zope/app/browser/form/tests/test_radiowidget.py Sat Feb 7 23:36:10 2004
@@ -28,10 +28,10 @@
self._widget.context.allowed_values = (u'foo', u'bar')
def testProperties(self):
- self.assertEqual(self._widget.getValue('cssClass'), "")
- self.assertEqual(self._widget.getValue('extra'), '')
- self.assertEqual(self._widget.getValue('firstItem'), 0)
- self.assertEqual(self._widget.getValue('orientation'), 'vertical')
+ self.assertEqual(self._widget.cssClass, "")
+ self.assertEqual(self._widget.extra, '')
+ self.assertEqual(self._widget.firstItem, 0)
+ self.assertEqual(self._widget.orientation, 'vertical')
def testRenderItem(self):
=== Zope3/src/zope/app/browser/form/tests/test_textareawidget.py 1.9 => 1.9.24.1 ===
--- Zope3/src/zope/app/browser/form/tests/test_textareawidget.py:1.9 Sat Aug 16 13:23:37 2003
+++ Zope3/src/zope/app/browser/form/tests/test_textareawidget.py Sat Feb 7 23:36:10 2004
@@ -25,12 +25,12 @@
_WidgetFactory = TextAreaWidget
def testProperties(self):
- self.assertEqual(self._widget.getValue('tag'), 'input')
- self.assertEqual(self._widget.getValue('type'), 'text')
- self.assertEqual(self._widget.getValue('cssClass'), '')
- self.assertEqual(self._widget.getValue('extra'), '')
- self.assertEqual(self._widget.getValue('width'), 60)
- self.assertEqual(self._widget.getValue('height'), 15)
+ self.assertEqual(self._widget.tag, 'input')
+ self.assertEqual(self._widget.inputType, 'text')
+ self.assertEqual(self._widget.cssClass, '')
+ self.assertEqual(self._widget.extra, '')
+ self.assertEqual(self._widget.width, 60)
+ self.assertEqual(self._widget.height, 15)
def testRender(self):
value = "Foo Value"
=== Zope3/src/zope/app/browser/form/tests/test_textwidget.py 1.7 => 1.7.24.1 ===
--- Zope3/src/zope/app/browser/form/tests/test_textwidget.py:1.7 Wed Aug 13 17:28:04 2003
+++ Zope3/src/zope/app/browser/form/tests/test_textwidget.py Sat Feb 7 23:36:10 2004
@@ -25,13 +25,13 @@
_WidgetFactory = TextWidget
def testProperties(self):
- self.assertEqual(self._widget.getValue('tag'), 'input')
- self.assertEqual(self._widget.getValue('type'), 'text')
- self.assertEqual(self._widget.getValue('cssClass'), '')
- self.assertEqual(self._widget.getValue('extra'), '')
- self.assertEqual(self._widget.getValue('default'), '')
- self.assertEqual(self._widget.getValue('displayWidth'), 20)
- self.assertEqual(self._widget.getValue('displayMaxWidth'), '')
+ self.assertEqual(self._widget.tag, 'input')
+ self.assertEqual(self._widget.inputType, 'text')
+ self.assertEqual(self._widget.cssClass, '')
+ self.assertEqual(self._widget.extra, '')
+ self.assertEqual(self._widget.default, '')
+ self.assertEqual(self._widget.displayWidth, 20)
+ self.assertEqual(self._widget.displayMaxWidth, '')
def testRender(self):
value = 'Foo Value'
More information about the Zope3-Checkins
mailing list