[Zope3-checkins] CVS: Zope3/src/zope/app/container/tests - test_rename.py:1.5

Steve Alexander steve@cat-box.net
Thu, 5 Jun 2003 08:03:47 -0400


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

Modified Files:
	test_rename.py 
Log Message:
Placeful setup for tests now sets up a  ZopeContainerDecorator.
This means that in such tests, you no longer need to use
ZopeContainerAdapter to get the correct events issued, and perform context-
wrapping duties, when you use a container.
However, it does mean that your tests need to expect these events and
context-wrappers to be used.



=== Zope3/src/zope/app/container/tests/test_rename.py 1.4 => 1.5 ===
--- Zope3/src/zope/app/container/tests/test_rename.py:1.4	Thu May  1 15:35:09 2003
+++ Zope3/src/zope/app/container/tests/test_rename.py	Thu Jun  5 08:03:15 2003
@@ -36,7 +36,6 @@
 from zope.app.copypastemove import ObjectMover
 from zope.app.content.file import File
 from zope.exceptions import NotFoundError, DuplicationError
-from zope.app.container.zopecontainer import ZopeContainerAdapter
 
 class RenameTest(PlacefulSetup, TestCase):
 
@@ -48,8 +47,7 @@
         provideAdapter(IContainer, IMoveSource, MoveSource)
         provideAdapter(None, IObjectName, ObjectName)
         provideAdapter(IContainer, IPasteNamesChooser, PasteNamesChooser)
-        provideAdapter(IContainer, IZopeContainer, ZopeContainerAdapter)
- 
+
     def test_simplerename(self):
         root = self.rootFolder
         folder1 = traverse(root, 'folder1')
@@ -60,7 +58,6 @@
         self.failIf('file1' in container)
         self.failUnless('my_file1' in container)
 
-
     def test_renamenonexisting(self):
         root = self.rootFolder
         folder1 = traverse(root, 'folder1')
@@ -68,7 +65,6 @@
         container = getAdapter(folder1, IZopeContainer)
         self.assertRaises(NotFoundError, container.rename, \
                           'file1', 'my_file1')
-
 
     def test_renamesamename(self):
         root = self.rootFolder