[Zope3-checkins] CVS: Zope3/src/zope/app/browser/component/tests -
test_interfacewidget.py:1.28
Jim Fulton
cvs-admin at zope.org
Fri Nov 21 12:11:06 EST 2003
Update of /cvs-repository/Zope3/src/zope/app/browser/component/tests
In directory cvs.zope.org:/tmp/cvs-serv31106/src/zope/app/browser/component/tests
Modified Files:
test_interfacewidget.py
Log Message:
Fixed a bug that caused an error if you entered a search string
without first selecting an interface.
=== Zope3/src/zope/app/browser/component/tests/test_interfacewidget.py 1.27 => 1.28 ===
--- Zope3/src/zope/app/browser/component/tests/test_interfacewidget.py:1.27 Fri Oct 3 16:40:47 2003
+++ Zope3/src/zope/app/browser/component/tests/test_interfacewidget.py Fri Nov 21 12:11:05 2003
@@ -188,6 +188,33 @@
)
self.assertEqual(widget(), out)
+ def testInterfaceWidget_search(self):
+ field = InterfaceField(__name__='TestName',
+ title=u"This is a test",
+ required=True)
+
+ request = TestRequest(form={'field.TestName': '',
+ 'field.TestName.search': '2',
+ })
+ widget = InterfaceWidget(field, request)
+
+
+ out = (
+ '<input type="text" name="field.TestName.search" value="2">'
+ '<select name="field.TestName">'
+ '<option value="">---select interface---</option>'
+
+ '<option value="'
+ 'zope.app.browser.component.tests.test_interfacewidget.I2'
+ '">'
+ 'zope.app.browser.component.tests.test_interfacewidget.I2'
+ '</option>'
+
+ '</select>'
+ )
+
+ self.assertEqual(widget(), out)
+
def testInterfaceWidget_w_constraint(self):
request = self.request
field = InterfaceField(
More information about the Zope3-Checkins
mailing list