[Zope3-checkins] CVS: Zope3/src/zope/app/browser/container/tests - test_contents.py:1.3.4.1
runyaga
runyaga@thisbox.com
Thu, 6 Feb 2003 11:52:14 -0500
Update of /cvs-repository/Zope3/src/zope/app/browser/container/tests
In directory cvs.zope.org:/tmp/cvs-serv25119
Modified Files:
Tag: paris-copypasterename-branch
test_contents.py
Log Message:
borked but jim is coming to the rescue
=== Zope3/src/zope/app/browser/container/tests/test_contents.py 1.3 => 1.3.4.1 ===
--- Zope3/src/zope/app/browser/container/tests/test_contents.py:1.3 Fri Dec 27 10:22:51 2002
+++ Zope3/src/zope/app/browser/container/tests/test_contents.py Thu Feb 6 11:52:14 2003
@@ -21,6 +21,7 @@
from zope.app.tests.placelesssetup import PlacelessSetup
from zope.component.adapter import provideAdapter
+from zope.app.interfaces.traversing import ITraversable
from zope.app.interfaces.container import IZopeContainer
from zope.app.interfaces.container import IContainer
from zope.app.container.zopecontainer import ZopeContainerAdapter
@@ -44,7 +45,7 @@
def setUp(self):
PlacelessSetup.setUp(self)
provideAdapter(IContainer, IZopeContainer, ZopeContainerAdapter)
-
+ provideAdapter(ITraversable, IZopeContainer, ZopeContainerAdapter)
def testInfo(self):
# Do we get the correct information back from ContainerContents?
@@ -143,7 +144,18 @@
urls = map( lambda x: x['url'], info_list )
self.assert_( 'subcontainer' in urls )
-
+ def testRename( self ):
+ container = self._TestView__newContext()
+ fc = self._TestView__newView( container )
+ ids=['document1', 'document2']
+ for id in ids:
+ document = Document()
+ container.setObject(id, document)
+ fc.renameObjects(ids, ['document1_1',
+ 'document2_2'] )
+ self.failUnless('document1_1' not in container)
+ self.failIf('document_1 in container')
+
class IDocument(Interface):
pass