Commit f65fbb58 authored by Shane Hathaway's avatar Shane Hathaway

Added a test that exercises copying of objects not yet stored in the database.

parent b1f87d67
...@@ -134,6 +134,15 @@ class TestCopySupport( unittest.TestCase ): ...@@ -134,6 +134,15 @@ class TestCopySupport( unittest.TestCase ):
self.failIf( 'file' in self.folder1.objectIds() ) self.failIf( 'file' in self.folder1.objectIds() )
self.failUnless( 'file' in self.folder2.objectIds() ) 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(): def test_suite():
suite = unittest.TestSuite() suite = unittest.TestSuite()
suite.addTest( unittest.makeSuite( TestCopySupport ) ) suite.addTest( unittest.makeSuite( TestCopySupport ) )
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment