[Zope3-checkins] CVS: Zope3/src/zope/app/container/tests - test_objectmover.py:1.1.2.5

Sidnei da Silva sidnei@x3ng.com.br
Tue, 4 Feb 2003 12:06:27 -0500


Update of /cvs-repository/Zope3/src/zope/app/container/tests
In directory cvs.zope.org:/tmp/cvs-serv22890/src/zope/app/container/tests

Modified Files:
      Tag: paris-copypasterename-branch
	test_objectmover.py 
Log Message:
Fourth stab at getting tests right. We are a little closer now.

=== Zope3/src/zope/app/container/tests/test_objectmover.py 1.1.2.4 => 1.1.2.5 ===
--- Zope3/src/zope/app/container/tests/test_objectmover.py:1.1.2.4	Tue Feb  4 11:50:41 2003
+++ Zope3/src/zope/app/container/tests/test_objectmover.py	Tue Feb  4 12:06:25 2003
@@ -22,6 +22,8 @@
 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.copy import IObjectMover, IObjectCopier
 from zope.app.interfaces.container import IPasteTarget
 from zope.app.interfaces.container import IMoveSource
@@ -39,6 +41,7 @@
         provideAdapter(None, IObjectMover, ObjectMover)
         provideAdapter(None, IPasteTarget, PasteTarget)
         provideAdapter(None, IMoveSource, MoveSource)
+        provideAdapter(None, IObjectName, ObjectName)
  
     def test_moveto(self):
         root = self.rootFolder
@@ -46,10 +49,10 @@
         container.setObject('file1', File())
         file = traverse(root, 'folder1/file1')
         mover = getAdapter(file, IObjectMover)
-        paster = getAdapter(container, IPasteTarget)
-        mover.moveTo(paster, 'file2')
-        self.failIf('file1' in self._container)
-        self.failUnless('file2' in self._container)
+        #paster = getAdapter(container, IPasteTarget)
+        mover.moveTo(container, 'file2')
+        self.failIf('file1' in container)
+        self.failUnless('file2' in container)
 
     def test_moveable(self):
         root = self.rootFolder