[Zope3-checkins] CVS: Zope3/src/zope/app/content/tests -
test_folder.py:1.10
Jim Fulton
jim at zope.com
Sun Sep 21 13:32:32 EDT 2003
Update of /cvs-repository/Zope3/src/zope/app/content/tests
In directory cvs.zope.org:/tmp/cvs-serv13780/src/zope/app/content/tests
Modified Files:
test_folder.py
Log Message:
Got rid of ICloneWithoutChildren support.
=== Zope3/src/zope/app/content/tests/test_folder.py 1.9 => 1.10 ===
--- Zope3/src/zope/app/content/tests/test_folder.py:1.9 Mon Jul 28 07:45:28 2003
+++ Zope3/src/zope/app/content/tests/test_folder.py Sun Sep 21 13:32:01 2003
@@ -23,7 +23,6 @@
import BaseTestServiceManagerContainer
from zope.app.container.tests.test_icontainer import BaseTestIContainer
from zope.app.container.tests.test_icontainer import DefaultTestData
-from zope.app.interfaces.content.folder import ICloneWithoutChildren
class Test(BaseTestIContainer, BaseTestServiceManagerContainer, TestCase):
@@ -40,38 +39,6 @@
def getBadKeyTypes(self):
return [None, ['foo'], 1, '\xf3abc']
- def test_cloneWithoutChildren(self):
- folder = self.makeTestObject()
- self.failUnless(ICloneWithoutChildren.isImplementedBy(folder))
-
- data = self.makeTestData()
- objects = [ data[i][1] for i in range(4) ]
- folder.setObject('foo', objects[0])
- folder.setObject('bar', objects[1])
- folder.setObject('baz', objects[2])
- folder.setObject('bam', objects[3])
-
- new_folder = folder.cloneWithoutChildren()
-
- self.failIf(new_folder is folder)
-
- self.assertEquals(len(new_folder.keys()), 0)
- self.failIf('foo' in new_folder.keys())
- self.failIf('bar' in new_folder.keys())
- self.failIf('baz' in new_folder.keys())
- self.failIf('bam' in new_folder.keys())
-
- self.assertEquals(len(new_folder.values()), 0)
- self.failIf(objects[0] in new_folder.values())
- self.failIf(objects[1] in new_folder.values())
- self.failIf(objects[2] in new_folder.values())
- self.failIf(objects[3] in new_folder.values())
-
- del folder['foo']
- del folder['bar']
- del folder['baz']
- del folder['bam']
-
class FolderMetaDataTest(PlacefulSetup, TestCase):
@@ -79,20 +46,6 @@
PlacefulSetup.setUp(self)
PlacefulSetup.buildFolders(self)
provideAdapter(IFolder, IZopeDublinCore, ZDCAnnotatableAdapter)
-
- def test_cloneWithoutChildrenMetadata(self):
- root = self.rootFolder
- folder = traverse(root, 'folder1')
- self.failUnless(ICloneWithoutChildren.isImplementedBy(folder))
- getAdapter(folder, IZopeDublinCore).title = u'foo'
- getAdapter(folder, IZopeDublinCore).description = u'bar'
-
- new_folder = folder.cloneWithoutChildren()
-
- self.assertEquals(getAdapter(new_folder, IZopeDublinCore).title,
- u'foo')
- self.assertEquals(getAdapter(new_folder, IZopeDublinCore).description,
- u'bar')
def test_suite():
return TestSuite((
More information about the Zope3-Checkins
mailing list