[Zope3-checkins] CVS: Zope3/lib/python/Zope/App/OFS/Container/Views/Browser/tests - testAdding.py:1.5
Steve Alexander
steve@cat-box.net
Mon, 18 Nov 2002 08:40:38 -0500
Update of /cvs-repository/Zope3/lib/python/Zope/App/OFS/Container/Views/Browser/tests
In directory cvs.zope.org:/tmp/cvs-serv1324/tests
Modified Files:
testAdding.py
Log Message:
This is the test that failed before my recent change to Adding.py.
It now passes :)
=== Zope3/lib/python/Zope/App/OFS/Container/Views/Browser/tests/testAdding.py 1.4 => 1.5 ===
--- Zope3/lib/python/Zope/App/OFS/Container/Views/Browser/tests/testAdding.py:1.4 Fri Oct 4 15:48:31 2002
+++ Zope3/lib/python/Zope/App/OFS/Container/Views/Browser/tests/testAdding.py Mon Nov 18 08:40:38 2002
@@ -16,7 +16,7 @@
$Id$
"""
-from unittest import TestCase, TestSuite, main, makeSuite
+from unittest import TestCase, main, makeSuite
from Zope.App.OFS.Container.Views.Browser.Adding import Adding
from Zope.App.OFS.Container.IAdding import IAdding
@@ -85,6 +85,17 @@
self.assertEqual(getWrapperContainer(result), container)
self.assertEqual(getWrapperObject(result), o)
self.assertEqual(getWrapperData(result)["name"], "foo")
+
+ def testNoNameGiven(self):
+ container = Container()
+ request = TestRequest()
+ adding = Adding(container, request)
+ provideView(IAdding, "Thing", IBrowserPresentation, CreationView)
+
+ self.assertEqual(adding.contentName, None)
+ view = adding.publishTraverse(request, 'Thing=')
+ self.assertEqual(adding.contentName, '')
+
def test_suite():
return makeSuite(Test)