[Zope3-checkins] CVS: Zope3/src/zope/app/browser/component/tests - test_interfacewidget.py:1.27.4.1

Jim Fulton cvs-admin at zope.org
Tue Nov 18 17:26:49 EST 2003


Update of /cvs-repository/Zope3/src/zope/app/browser/component/tests
In directory cvs.zope.org:/tmp/cvs-serv19243/src/zope/app/browser/component/tests

Modified Files:
      Tag: adaptergeddon-branch
	test_interfacewidget.py 
Log Message:
Implemented local presentation services.


=== Zope3/src/zope/app/browser/component/tests/test_interfacewidget.py 1.27 => 1.27.4.1 ===
--- 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	Tue Nov 18 17:26:18 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