[Zope-Checkins] CVS: Zope/lib/python/OFS/tests - testCopySupport.py:1.4

Shane Hathaway shane@cvs.zope.org
Wed, 12 Jun 2002 14:17:00 -0400


Update of /cvs-repository/Zope/lib/python/OFS/tests
In directory cvs.zope.org:/tmp/cvs-serv20137

Modified Files:
	testCopySupport.py 
Log Message:
Added a test that exercises copying of objects not yet stored in the database.


=== Zope/lib/python/OFS/tests/testCopySupport.py 1.3 => 1.4 ===
         self.failUnless( 'file' in self.folder2.objectIds() )
 
+    def testCopyNewObject(self):
+        self.failIf('newfile' in self.folder1.objectIds())
+        manage_addFile(self.folder1, 'newfile',
+                       file='', content_type='text/plain')
+        cookie = self.folder1.manage_copyObjects(ids=('newfile',))
+        self.folder2.manage_pasteObjects(cookie)
+        self.failUnless('newfile' in self.folder1.objectIds())
+        self.failUnless('newfile' in self.folder2.objectIds())
+
 def test_suite():
     suite = unittest.TestSuite()
     suite.addTest( unittest.makeSuite( TestCopySupport ) )