[Zope3-checkins] CVS: Zope3/src/zope/app/container/tests - test_objectcopier.py:1.9 test_objectmover.py:1.6 test_rename.py:1.6
Steve Alexander
steve@cat-box.net
Fri, 13 Jun 2003 13:41:45 -0400
Update of /cvs-repository/Zope3/src/zope/app/container/tests
In directory cvs.zope.org:/tmp/cvs-serv28622/src/zope/app/container/tests
Modified Files:
test_objectcopier.py test_objectmover.py test_rename.py
Log Message:
Removed the @@object_name view, as used in some page templates, and
the ObjectName view and adapter also.
Extended IPhysicallyLocatable with a getName method.
Renamed the convenience function objectName to getName.
If you have page templates that use @@object_name, then you can replace it
with zope:name.
=== Zope3/src/zope/app/container/tests/test_objectcopier.py 1.8 => 1.9 ===
--- Zope3/src/zope/app/container/tests/test_objectcopier.py:1.8 Sun Jun 8 12:39:46 2003
+++ Zope3/src/zope/app/container/tests/test_objectcopier.py Fri Jun 13 13:41:14 2003
@@ -22,9 +22,8 @@
from zope.app.services.tests.placefulsetup import PlacefulSetup
from zope.component import getAdapter, ComponentLookupError
from zope.component.adapter import provideAdapter
-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.copypastemove import IObjectCopier
+from zope.app.interfaces.copypastemove import INoChildrenObjectCopier
from zope.app.interfaces.container import CopyException
from zope.app.interfaces.container import IContainer
from zope.app.interfaces.container import IPasteTarget
@@ -45,9 +44,8 @@
provideAdapter(None, IObjectCopier, ObjectCopier)
provideAdapter(IContainer, IPasteTarget, PasteTarget)
provideAdapter(IContainer, ICopySource, CopySource)
- provideAdapter(None, IObjectName, ObjectName)
provideAdapter(IContainer, IPasteNamesChooser, PasteNamesChooser)
-
+
def test_copytosame(self):
root = self.rootFolder
container = traverse(root, 'folder1')
@@ -175,9 +173,8 @@
provideAdapter(IContainer, IPasteTarget, PasteTarget)
provideAdapter(IContainer, ICopySource, CopySource)
provideAdapter(IContainer, INoChildrenCopySource, NoChildrenCopySource)
- provideAdapter(None, IObjectName, ObjectName)
provideAdapter(IContainer, IPasteNamesChooser, PasteNamesChooser)
-
+
def test_copytosame(self):
root = self.rootFolder
container = traverse(root, 'folder1')
@@ -192,7 +189,8 @@
container = traverse(root, 'folder1')
container.setObject('file1', File())
file = traverse(root, 'folder1/file1')
- self.assertRaises(ComponentLookupError, getAdapter, file, INoChildrenObjectCopier)
+ self.assertRaises(ComponentLookupError,
+ getAdapter, file, INoChildrenObjectCopier)
def test_copytoother(self):
root = self.rootFolder
@@ -209,7 +207,8 @@
container = traverse(root, 'folder1')
container.setObject('file1', File())
file = traverse(root, 'folder1/file1')
- self.assertRaises(ComponentLookupError, getAdapter, file, INoChildrenObjectCopier)
+ self.assertRaises(ComponentLookupError,
+ getAdapter, file, INoChildrenObjectCopier)
def test_doesntimplementclonewithoutchildren(self):
root = self.rootFolder
=== Zope3/src/zope/app/container/tests/test_objectmover.py 1.5 => 1.6 ===
--- Zope3/src/zope/app/container/tests/test_objectmover.py:1.5 Thu May 1 15:35:09 2003
+++ Zope3/src/zope/app/container/tests/test_objectmover.py Fri Jun 13 13:41:14 2003
@@ -22,8 +22,6 @@
from zope.app.services.tests.placefulsetup import PlacefulSetup
from zope.component import getAdapter
from zope.component.adapter import provideAdapter
-from zope.app.traversing import IObjectName
-from zope.app.traversing.adapters import ObjectName
from zope.app.interfaces.copypastemove import IObjectMover
from zope.app.interfaces.content.folder import IFolder
from zope.app.interfaces.container import IPasteTarget
@@ -43,7 +41,6 @@
provideAdapter(None, IObjectMover, ObjectMover)
provideAdapter(IFolder, IPasteTarget, PasteTarget)
provideAdapter(IFolder, IMoveSource, MoveSource)
- provideAdapter(None, IObjectName, ObjectName)
provideAdapter(IFolder, IPasteNamesChooser, PasteNamesChooser)
def test_movetosame(self):
=== Zope3/src/zope/app/container/tests/test_rename.py 1.5 => 1.6 ===
--- Zope3/src/zope/app/container/tests/test_rename.py:1.5 Thu Jun 5 08:03:15 2003
+++ Zope3/src/zope/app/container/tests/test_rename.py Fri Jun 13 13:41:14 2003
@@ -22,8 +22,6 @@
from zope.app.services.tests.placefulsetup import PlacefulSetup
from zope.component import getAdapter
from zope.component.adapter import provideAdapter
-from zope.app.traversing import IObjectName
-from zope.app.traversing.adapters import ObjectName
from zope.app.interfaces.copypastemove import IObjectMover
from zope.app.interfaces.container import IContainer
from zope.app.interfaces.container import IPasteTarget
@@ -45,7 +43,6 @@
provideAdapter(None, IObjectMover, ObjectMover)
provideAdapter(IContainer, IPasteTarget, PasteTarget)
provideAdapter(IContainer, IMoveSource, MoveSource)
- provideAdapter(None, IObjectName, ObjectName)
provideAdapter(IContainer, IPasteNamesChooser, PasteNamesChooser)
def test_simplerename(self):