[Zope3-checkins] CVS: Zope3/src/zope/app/browser/component/tests - test_interfacewidget.py:1.7
Steve Alexander
steve@cat-box.net
Wed, 8 Jan 2003 13:39:23 -0500
Update of /cvs-repository/Zope3/src/zope/app/browser/component/tests
In directory cvs.zope.org:/tmp/cvs-serv23394/src/zope/app/browser/component/tests
Modified Files:
test_interfacewidget.py
Log Message:
Removed XXX comment demanding a test in exchange for providing said test.
=== Zope3/src/zope/app/browser/component/tests/test_interfacewidget.py 1.6 => 1.7 ===
--- Zope3/src/zope/app/browser/component/tests/test_interfacewidget.py:1.6 Mon Jan 6 14:09:57 2003
+++ Zope3/src/zope/app/browser/component/tests/test_interfacewidget.py Wed Jan 8 13:39:21 2003
@@ -28,7 +28,7 @@
from zope.app.browser.component.interfacewidget import MultiInterfaceWidget
from zope.publisher.browser import TestRequest
from zope.component.service import serviceManager, defineService
-
+from zope.app.interfaces.forms import ConversionError
class I(Interface):
"""bah blah
@@ -63,6 +63,19 @@
class TestInterfaceWidget(BaseInterfaceWidgetTest):
+
+ def testBadInterface(self):
+ request = self.request
+ field = InterfaceField(__name__='TestName',
+ title=u"This is a test",
+ required=False)
+
+ widget = InterfaceWidget(field, request)
+
+ request.form["field.TestName"] = (
+ 'bad interface name'
+ )
+ self.assertRaises(ConversionError, widget.getData)
def testInterfaceWidget(self):
request = self.request