[Zope3-checkins]
SVN: Zope3/trunk/src/zope/app/form/browser/ftests/test_textwidget.py
Added explanantion.
Stephan Richter
srichter at cosmos.phy.tufts.edu
Fri Jul 9 11:47:16 EDT 2004
Log message for revision 26357:
Added explanantion.
-=-
Modified: Zope3/trunk/src/zope/app/form/browser/ftests/test_textwidget.py
===================================================================
--- Zope3/trunk/src/zope/app/form/browser/ftests/test_textwidget.py 2004-07-09 15:47:14 UTC (rev 26356)
+++ Zope3/trunk/src/zope/app/form/browser/ftests/test_textwidget.py 2004-07-09 15:47:16 UTC (rev 26357)
@@ -113,12 +113,15 @@
# submit invalud type for text line
response = self.publish('/test/edit.html', form={
'UPDATE_SUBMIT' : '',
- 'field.s1' : 123 }) # not unicode
+ 'field.s1' : '' }) # not unicode (but automatically converted to it.
self.assertEqual(response.getStatus(), 200)
-
- object = traverse(self.getRootFolder(), 'test')
- self.assert_(object.s1, u'123')
+ # We don't have a invalid field value
+ #since we convert the value to unicode
+ self.assert_(not validationErrorExists(
+ 's1', 'Object is of wrong type.', response.getBody()))
+
+
def test_missing_value(self):
self.getRootFolder()['test'] = TextLineTest()
get_transaction().commit()
More information about the Zope3-Checkins
mailing list