[Zope3-checkins] CVS: Zope3/src/zope/app/browser/container/tests - test_contents.py:1.11
Sidnei da Silva
sidnei@x3ng.com.br
Sun, 30 Mar 2003 12:38:42 -0500
Update of /cvs-repository/Zope3/src/zope/app/browser/container/tests
In directory cvs.zope.org:/tmp/cvs-serv3834/src/zope/app/browser/container/tests
Modified Files:
test_contents.py
Log Message:
And while we are at it, why not add a few more?
=== Zope3/src/zope/app/browser/container/tests/test_contents.py 1.10 => 1.11 ===
--- Zope3/src/zope/app/browser/container/tests/test_contents.py:1.10 Sun Mar 30 12:34:34 2003
+++ Zope3/src/zope/app/browser/container/tests/test_contents.py Sun Mar 30 12:38:41 2003
@@ -268,6 +268,33 @@
self.failIf('document1' not in container)
self.failIf('document2' not in container)
+ def testCutFolder(self):
+ container = traverse(self.rootFolder, 'folder1')
+ fc = self._TestView__newView(container)
+ ids = ['folder1_1']
+ fc.cutObjects(ids)
+ fc.pasteObjects()
+ self.failIf('folder1_1' not in container)
+
+ def testCutFolder2(self):
+ container = traverse(self.rootFolder, '/folder1/folder1_1')
+ fc = self._TestView__newView(container)
+ ids = ['folder1_1_1']
+ fc.cutObjects(ids)
+ fc.pasteObjects()
+ self.failIf('folder1_1_1' not in container)
+
+ def testCutFolder3(self):
+ container = traverse(self.rootFolder, '/folder1/folder1_1')
+ target = traverse(self.rootFolder, '/folder2/folder2_1')
+ fc = self._TestView__newView(container)
+ tg = self._TestView__newView(target)
+ ids = ['folder1_1_1']
+ fc.cutObjects(ids)
+ tg.pasteObjects()
+ self.failIf('folder1_1_1' in container)
+ self.failIf('folder1_1_1' not in target)
+
def _TestView__newView(self, container):
from zope.app.browser.container.contents import Contents
from zope.publisher.browser import TestRequest