[Zope3-checkins] CVS: Zope3/src/zope/app/container/tests - test_objectcopier.py:1.8
Stephan Richter
srichter@cosmos.phy.tufts.edu
Sun, 8 Jun 2003 12:39:47 -0400
Update of /cvs-repository/Zope3/src/zope/app/container/tests
In directory cvs.zope.org:/tmp/cvs-serv32472/src/zope/app/container/tests
Modified Files:
test_objectcopier.py
Log Message:
Cleaned up a couple of things about container versus folder:
1. Copy, Cut and Paste support is defined in zope.app.container, so
IContainer should be able to execute these actions, not only Folder.
2. Show Copy, Cut and Paste button even though there is no content.
3. Remove IFolder specific tests and ZCML declarations.
Wow, I should have found this bug a long time ago, when I was working on
Zwiki, but I cheated back then by using Folder as base class...writing
documentation really helps to track these type of problems down.
XXX: The content and browser/content directives look very aged and could be
redone much better now.
=== Zope3/src/zope/app/container/tests/test_objectcopier.py 1.7 => 1.8 ===
--- Zope3/src/zope/app/container/tests/test_objectcopier.py:1.7 Thu May 1 15:35:09 2003
+++ Zope3/src/zope/app/container/tests/test_objectcopier.py Sun Jun 8 12:39:46 2003
@@ -25,7 +25,6 @@
from zope.app.traversing import IObjectName
from zope.app.traversing.adapters import ObjectName
from zope.app.interfaces.copypastemove import IObjectCopier, INoChildrenObjectCopier
-from zope.app.interfaces.content.folder import IFolder
from zope.app.interfaces.container import CopyException
from zope.app.interfaces.container import IContainer
from zope.app.interfaces.container import IPasteTarget
@@ -44,10 +43,10 @@
PlacefulSetup.setUp(self)
PlacefulSetup.buildFolders(self)
provideAdapter(None, IObjectCopier, ObjectCopier)
- provideAdapter(IFolder, IPasteTarget, PasteTarget)
- provideAdapter(IFolder, ICopySource, CopySource)
+ provideAdapter(IContainer, IPasteTarget, PasteTarget)
+ provideAdapter(IContainer, ICopySource, CopySource)
provideAdapter(None, IObjectName, ObjectName)
- provideAdapter(IFolder, IPasteNamesChooser, PasteNamesChooser)
+ provideAdapter(IContainer, IPasteNamesChooser, PasteNamesChooser)
def test_copytosame(self):
root = self.rootFolder
@@ -171,14 +170,13 @@
PlacefulSetup.setUp(self)
PlacefulSetup.buildFolders(self)
provideAdapter(None, IObjectCopier, ObjectCopier)
- provideAdapter(IFolder, INoChildrenObjectCopier, NoChildrenObjectCopier)
- provideAdapter(IContainer, INoChildrenObjectCopier, NoChildrenObjectCopier)
- provideAdapter(IFolder, IPasteTarget, PasteTarget)
- provideAdapter(IFolder, ICopySource, CopySource)
- provideAdapter(IFolder, INoChildrenCopySource, NoChildrenCopySource)
+ provideAdapter(IContainer, INoChildrenObjectCopier,
+ NoChildrenObjectCopier)
+ provideAdapter(IContainer, IPasteTarget, PasteTarget)
+ provideAdapter(IContainer, ICopySource, CopySource)
provideAdapter(IContainer, INoChildrenCopySource, NoChildrenCopySource)
provideAdapter(None, IObjectName, ObjectName)
- provideAdapter(IFolder, IPasteNamesChooser, PasteNamesChooser)
+ provideAdapter(IContainer, IPasteNamesChooser, PasteNamesChooser)
def test_copytosame(self):
root = self.rootFolder