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

Steve Alexander steve@cat-box.net
Wed, 8 Jan 2003 13:42:28 -0500


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

Modified Files:
	test_interfacewidget.py 
Log Message:
removed another XXX comment demanding a test, in exchange for providing
the test.


=== Zope3/src/zope/app/browser/component/tests/test_interfacewidget.py 1.7 => 1.8 ===
--- Zope3/src/zope/app/browser/component/tests/test_interfacewidget.py:1.7	Wed Jan  8 13:39:21 2003
+++ Zope3/src/zope/app/browser/component/tests/test_interfacewidget.py	Wed Jan  8 13:42:24 2003
@@ -64,19 +64,6 @@
 
 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
         field = InterfaceField(__name__='TestName',
@@ -282,6 +269,19 @@
 
         self.assertEqual(widget(), out)
 
+    def testBadInterfaceName(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)
+
 
 class TestMultiInterfaceWidget(BaseInterfaceWidgetTest):
 
@@ -604,6 +604,19 @@
         )
         self.assertEqual(widget(), out)
 
+    def testBadInterfaceName(self):
+        request = self.request
+        field = InterfaceField(__name__='TestName',
+                               title=u"This is a test",
+                               required=False)
+
+        widget = MultiInterfaceWidget(field, request)
+
+        request.form["field.TestName.i0"] = (
+        'bad interface name'
+        )
+        self.assertRaises(ConversionError, widget.getData)
+        
 
 def test_suite():
     return TestSuite((makeSuite(TestInterfaceWidget),