Commit 951c1d11 authored by Łukasz Nowak's avatar Łukasz Nowak

- check that folder in migrated folder is BTree

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@25461 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent f655222c
...@@ -431,6 +431,23 @@ class TestFolderMigration(ERP5TypeTestCase, LogInterceptor): ...@@ -431,6 +431,23 @@ class TestFolderMigration(ERP5TypeTestCase, LogInterceptor):
self.assertEqual(len(self.folder.objectIds(base_id='BASE-BELONG')), 1) self.assertEqual(len(self.folder.objectIds(base_id='BASE-BELONG')), 1)
self.assertEqual(len(self.folder.objectValues(base_id='BASE-BELONG')), 1) self.assertEqual(len(self.folder.objectValues(base_id='BASE-BELONG')), 1)
def test_11_folderInMigratedFolderIsBTree(self, quiet=0, run=1):
"""
Test the folder is a BTree
"""
if not run : return
if not quiet:
message = 'Test folderIsBtree'
LOG('Testing... ', 0, message)
self.folder.migrateToHBTree()
get_transaction().commit()
self.tic()
infolder = self.newContent()
self.assertRaises(NotImplementedError, infolder.getTreeIdList)
self.assertEqual(infolder.isBTree(), True)
self.assertEqual(infolder.isHBTree(), False)
def test_suite(): def test_suite():
suite = unittest.TestSuite() suite = unittest.TestSuite()
suite.addTest(unittest.makeSuite(TestFolderMigration)) suite.addTest(unittest.makeSuite(TestFolderMigration))
......
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