Commit 77a581a0 authored by Jérome Perrin's avatar Jérome Perrin

testTrashTool: py3

parent 1f2fd46d
...@@ -267,7 +267,7 @@ class TestTrashTool(ERP5TypeTestCase): ...@@ -267,7 +267,7 @@ class TestTrashTool(ERP5TypeTestCase):
bc_path = base_category.getPath().split('/')[2:-1] bc_path = base_category.getPath().split('/')[2:-1]
# check backup # check backup
backup_subobjects_ids = trash.backupObject(trashbin, bc_path, bc_id, save=1) backup_subobjects_ids = trash.backupObject(trashbin, bc_path, bc_id, save=1)
self.assertTrue(backup_subobjects_ids.keys().sort() == list(subobjects_ids).sort()) self.assertEqual(sorted(backup_subobjects_ids.keys()), sorted(subobjects_ids))
def stepBackupFolderObjectsWithSave(self, sequence=None, sequence_list=None, **kw): def stepBackupFolderObjectsWithSave(self, sequence=None, sequence_list=None, **kw):
""" """
...@@ -297,7 +297,7 @@ class TestTrashTool(ERP5TypeTestCase): ...@@ -297,7 +297,7 @@ class TestTrashTool(ERP5TypeTestCase):
bc_path = base_category.getPath().split('/')[1:-1] bc_path = base_category.getPath().split('/')[1:-1]
# check backup # check backup
backup_subobjects_ids = trash.backupObject(trashbin, bc_path, bc_id, save=0) backup_subobjects_ids = trash.backupObject(trashbin, bc_path, bc_id, save=0)
self.assertTrue(backup_subobjects_ids.keys().sort() == list(subobjects_ids).sort()) self.assertEqual(sorted(backup_subobjects_ids.keys()), sorted(subobjects_ids))
def stepBackupObjectsWithKeepingSubobjects(self, sequence=None, sequence_list=None, **kw): def stepBackupObjectsWithKeepingSubobjects(self, sequence=None, sequence_list=None, **kw):
""" """
...@@ -359,8 +359,8 @@ class TestTrashTool(ERP5TypeTestCase): ...@@ -359,8 +359,8 @@ class TestTrashTool(ERP5TypeTestCase):
def stepCheckRestore(self, sequence=None, sequence_list=None, **kw): def stepCheckRestore(self, sequence=None, sequence_list=None, **kw):
bc_id = sequence.get('bc_id') bc_id = sequence.get('bc_id')
bc = self.portal.portal_categories[bc_id] bc = self.portal.portal_categories[bc_id]
self.assertTrue( self.assertEqual(
sorted(bc.objectIds()) == sorted(sequence.get('category_id_list')) sorted(bc.objectIds()), sorted(sequence.get('category_id_list'))
) )
self.assertEqual( self.assertEqual(
len( len(
......
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