[Zope3-checkins]
CVS: Zope3/src/zope/app/browser/services/registration/tests
- test_registrationstatuswidget.py:1.3
Garrett Smith
garrett at mojave-corp.com
Wed Aug 13 18:28:55 EDT 2003
Update of /cvs-repository/Zope3/src/zope/app/browser/services/registration/tests
In directory cvs.zope.org:/tmp/cvs-serv9151/src/zope/app/browser/services/registration/tests
Modified Files:
test_registrationstatuswidget.py
Log Message:
Made the following changes to the widget machinery:
- Renamed IWidget getData to getInputValue
getInputValue no longer accepts an 'optional' flag. If value is missing or is invalid, getInputValue will raise an error. Calls made to this method should be in a try...except block to handle such conditions.
- Renamed IWidget haveData to hasInput
- Added method hasValidInput to IWidget and widget implementations
- Renamed IWidget setData to setRenderedValue
- Added functional tests for some of the core widgets - additional ftests are needed
- Deleted the class PossibleEmptyMeansMissing - it's no longer needed
- Added deprecation tests for changes to widgets
- Some widgets were refactored to use the new framework correctly
These changes were based on the proposal:
http://dev.zope.org/Zope3/ComponentArchitecture/WidgetsFormsSchemas
Not all the changes in the proposal are included in this commit. Specifically, getRawData/setRawData and the refactoring of the widget error classes are the two major changes not included in this commit.
=== Zope3/src/zope/app/browser/services/registration/tests/test_registrationstatuswidget.py 1.2 => 1.3 ===
--- Zope3/src/zope/app/browser/services/registration/tests/test_registrationstatuswidget.py:1.2 Thu Aug 7 20:14:38 2003
+++ Zope3/src/zope/app/browser/services/registration/tests/test_registrationstatuswidget.py Wed Aug 13 17:28:20 2003
@@ -63,7 +63,7 @@
u'type="radio" value="Active" /><label '
u'for="f.status.2">Active</label>')
- widget.setData("Active")
+ widget.setRenderedValue("Active")
text = ' '.join(widget().split())
self.assertEqual(
text,
@@ -80,7 +80,7 @@
u'<label for="f.status.2">Active</label>'
)
- widget.setData(u"Unregistered")
+ widget.setRenderedValue(u"Unregistered")
text = ' '.join(widget().split())
self.assertEqual(
text,
More information about the Zope3-Checkins
mailing list