From 52d53677d7f7a416a662097036973d9cac451d4a Mon Sep 17 00:00:00 2001 From: Niklaus Johner Date: Fri, 8 Jan 2021 15:07:43 +0100 Subject: [PATCH] Adapt os migration tests to new namings. --- opengever/bundle/tests/test_os_migration.py | 148 ++++++++++---------- 1 file changed, 74 insertions(+), 74 deletions(-) diff --git a/opengever/bundle/tests/test_os_migration.py b/opengever/bundle/tests/test_os_migration.py index cd0540cb1b3..d3ea4706ff3 100644 --- a/opengever/bundle/tests/test_os_migration.py +++ b/opengever/bundle/tests/test_os_migration.py @@ -9,11 +9,11 @@ from opengever.base.security import elevated_privileges from opengever.bundle.sections.constructor import BUNDLE_GUID_KEY from opengever.globalindex.handlers.task import TaskSqlSyncer -from opengever.maintenance.scripts.repository_migration_analyse import MigrationPreconditionsError -from opengever.maintenance.scripts.repository_migration_analyse import MigrationValidationError -from opengever.maintenance.scripts.repository_migration_analyse import OperationItem -from opengever.maintenance.scripts.repository_migration_analyse import RepositoryExcelAnalyser -from opengever.maintenance.scripts.repository_migration_analyse import RepositoryMigrator +from opengever.maintenance.scripts.repository_migration import MigrationPreconditionsError +from opengever.maintenance.scripts.repository_migration import MigrationValidationError +from opengever.maintenance.scripts.repository_migration import RepositoryPosition +from opengever.maintenance.scripts.repository_migration import RepositoryExcelAnalyser +from opengever.maintenance.scripts.repository_migration import RepositoryMigrator from opengever.testing import IntegrationTestCase from opengever.testing import obj2brain from pkg_resources import resource_filename @@ -98,7 +98,7 @@ def assertObjectConsistency(self, obj, parent_refnum=None, parent_path=None): @staticmethod def get_changed_rows(rows): - return [row for row in rows if not row['old_item'] == row['new_item']] + return [row for row in rows if not row['old_repo_pos'] == row['new_repo_pos']] class TestOSMigrationAnalysis(IntegrationTestCase, OSMigrationTestMixin): @@ -131,7 +131,7 @@ def test_repository_excel_analyser_os_test_branch_and_leaf_creation(self): {'is_valid': True, 'leaf_node_violated': False, 'merge_into': None, - 'new_item': OperationItem(1, u"F\xfchrung und Koordination", ""), + 'new_repo_pos': RepositoryPosition(1, u"F\xfchrung und Koordination", ""), 'new_number': None, 'new_parent_position': None, 'new_parent_uid': None, @@ -139,7 +139,7 @@ def test_repository_excel_analyser_os_test_branch_and_leaf_creation(self): 'new_position_parent_position': None, 'new_position_guid': None, 'new_title': u'F\xfchrung und Koordination', - 'old_item': OperationItem(1, u"F\xfchrung", ''), + 'old_repo_pos': RepositoryPosition(1, u"F\xfchrung", ''), 'permissions': None, 'repository_depth_violated': False, 'uid': self.branch_repofolder.UID()}, @@ -149,7 +149,7 @@ def test_repository_excel_analyser_os_test_branch_and_leaf_creation(self): {'is_valid': True, 'leaf_node_violated': False, 'merge_into': None, - 'new_item': OperationItem(0, u'Allgemeines und \xdcbergreifendes'), + 'new_repo_pos': RepositoryPosition(0, u'Allgemeines und \xdcbergreifendes'), 'new_number': '0', 'new_parent_position': None, 'new_parent_uid': None, @@ -157,7 +157,7 @@ def test_repository_excel_analyser_os_test_branch_and_leaf_creation(self): 'new_position_parent_position': None, 'new_position_guid': None, 'new_title': u'Allgemeines und \xdcbergreifendes', - 'old_item': OperationItem(2, u"Rechnungspr\xfcfungskommission", ''), + 'old_repo_pos': RepositoryPosition(2, u"Rechnungspr\xfcfungskommission", ''), 'permissions': None, 'repository_depth_violated': False, 'uid': self.empty_repofolder.UID()}, @@ -170,7 +170,7 @@ def test_repository_excel_analyser_os_test_branch_and_leaf_creation(self): {'is_valid': True, 'leaf_node_violated': False, 'merge_into': None, - 'new_item': OperationItem(4, 'Created branch', 'comment 1'), + 'new_repo_pos': RepositoryPosition(4, 'Created branch', 'comment 1'), 'new_number': None, 'new_parent_position': None, 'new_parent_uid': None, @@ -178,7 +178,7 @@ def test_repository_excel_analyser_os_test_branch_and_leaf_creation(self): 'new_position_parent_position': '', 'new_position_guid': new_branch_guid, 'new_title': None, - 'old_item': OperationItem(), + 'old_repo_pos': RepositoryPosition(), 'permissions': {'add': [], 'block_inheritance': False, 'close': [], @@ -196,7 +196,7 @@ def test_repository_excel_analyser_os_test_branch_and_leaf_creation(self): {'is_valid': True, 'leaf_node_violated': False, 'merge_into': None, - 'new_item': OperationItem(41, 'created leaf', 'comment 2'), + 'new_repo_pos': RepositoryPosition(41, 'created leaf', 'comment 2'), 'new_number': None, 'new_parent_position': None, 'new_parent_uid': None, @@ -204,7 +204,7 @@ def test_repository_excel_analyser_os_test_branch_and_leaf_creation(self): 'new_position_parent_position': None, 'new_position_guid': guid, 'new_title': None, - 'old_item': OperationItem(), + 'old_repo_pos': RepositoryPosition(), 'permissions': {'add': [], 'block_inheritance': False, 'close': [], @@ -223,7 +223,7 @@ def test_repository_excel_analyser_os_test_branch_and_leaf_creation(self): {'is_valid': True, 'leaf_node_violated': False, 'merge_into': None, - 'new_item': OperationItem(42, 'Moved leaf', 'comment for moved one'), + 'new_repo_pos': RepositoryPosition(42, 'Moved leaf', 'comment for moved one'), 'new_number': '2', 'new_parent_position': '4', 'new_parent_uid': uid, @@ -231,7 +231,7 @@ def test_repository_excel_analyser_os_test_branch_and_leaf_creation(self): 'new_position_parent_position': None, 'new_position_guid': None, 'new_title': u'Moved leaf', - 'old_item': OperationItem(11, u'Vertr\xe4ge und Vereinbarungen', 'Richtlinien'), + 'old_repo_pos': RepositoryPosition(11, u'Vertr\xe4ge und Vereinbarungen', 'Richtlinien'), 'permissions': None, 'repository_depth_violated': False, 'uid': self.leaf_repofolder.UID()}, @@ -250,7 +250,7 @@ def test_repository_excel_analyser_os_test_migration(self): {'is_valid': True, 'leaf_node_violated': False, 'merge_into': None, - 'new_item': OperationItem(1, u"F\xfchrung und Koordination", ""), + 'new_repo_pos': RepositoryPosition(1, u"F\xfchrung und Koordination", ""), 'new_number': None, 'new_parent_position': None, 'new_parent_uid': None, @@ -258,7 +258,7 @@ def test_repository_excel_analyser_os_test_migration(self): 'new_position_parent_position': None, 'new_position_guid': None, 'new_title': u'F\xfchrung und Koordination', - 'old_item': OperationItem(1, u"F\xfchrung", ''), + 'old_repo_pos': RepositoryPosition(1, u"F\xfchrung", ''), 'permissions': None, 'repository_depth_violated': False, 'uid': self.branch_repofolder.UID()}, @@ -268,7 +268,7 @@ def test_repository_excel_analyser_os_test_migration(self): {'is_valid': True, 'leaf_node_violated': False, 'merge_into': None, - 'new_item': OperationItem(0, u'Branch with new number', ''), + 'new_repo_pos': RepositoryPosition(0, u'Branch with new number', ''), 'new_number': '0', 'new_parent_position': None, 'new_parent_uid': None, @@ -276,7 +276,7 @@ def test_repository_excel_analyser_os_test_migration(self): 'new_position_parent_position': None, 'new_position_guid': None, 'new_title': u'Branch with new number', - 'old_item': OperationItem(2, u"Rechnungspr\xfcfungskommission", ''), + 'old_repo_pos': RepositoryPosition(2, u"Rechnungspr\xfcfungskommission", ''), 'permissions': None, 'repository_depth_violated': False, 'uid': self.empty_repofolder.UID()}, @@ -288,7 +288,7 @@ def test_repository_excel_analyser_os_test_migration(self): {'is_valid': True, 'leaf_node_violated': False, 'merge_into': None, - 'new_item': OperationItem('01', 'created leaf in branch with new number', 'comment 1'), + 'new_repo_pos': RepositoryPosition('01', 'created leaf in branch with new number', 'comment 1'), 'new_number': None, 'new_parent_position': None, 'new_parent_uid': None, @@ -296,7 +296,7 @@ def test_repository_excel_analyser_os_test_migration(self): 'new_position_parent_position': '2', 'new_position_guid': guid, 'new_title': None, - 'old_item': OperationItem(), + 'old_repo_pos': RepositoryPosition(), 'permissions': {'add': [], 'block_inheritance': False, 'close': [], @@ -314,7 +314,7 @@ def test_repository_excel_analyser_os_test_migration(self): {'is_valid': True, 'leaf_node_violated': False, 'merge_into': None, - 'new_item': OperationItem(12, 'created leaf in existing branch', 'comment 2'), + 'new_repo_pos': RepositoryPosition(12, 'created leaf in existing branch', 'comment 2'), 'new_number': None, 'new_parent_position': None, 'new_parent_uid': None, @@ -322,7 +322,7 @@ def test_repository_excel_analyser_os_test_migration(self): 'new_position_parent_position': '1', 'new_position_guid': guid, 'new_title': None, - 'old_item': OperationItem(), + 'old_repo_pos': RepositoryPosition(), 'permissions': {'add': [], 'block_inheritance': False, 'close': [], @@ -338,7 +338,7 @@ def test_repository_excel_analyser_os_test_migration(self): {'is_valid': True, 'leaf_node_violated': False, 'merge_into': None, - 'new_item': OperationItem('02', 'Moved leaf in branch with new number', 'comment for moved one'), + 'new_repo_pos': RepositoryPosition('02', 'Moved leaf in branch with new number', 'comment for moved one'), 'new_number': '2', 'new_parent_position': '0', 'new_parent_uid': self.empty_repofolder.UID(), @@ -346,7 +346,7 @@ def test_repository_excel_analyser_os_test_migration(self): 'new_position_parent_position': None, 'new_position_guid': None, 'new_title': u'Moved leaf in branch with new number', - 'old_item': OperationItem(11, u'Vertr\xe4ge und Vereinbarungen', 'Richtlinien'), + 'old_repo_pos': RepositoryPosition(11, u'Vertr\xe4ge und Vereinbarungen', 'Richtlinien'), 'permissions': None, 'repository_depth_violated': False, 'uid': self.leaf_repofolder.UID()}, @@ -371,7 +371,7 @@ def test_repository_excel_analyser_os_test_invalid(self): {'is_valid': False, 'leaf_node_violated': True, 'merge_into': None, - 'new_item': OperationItem('111', u"Rechnungspr\xfcfungskommission", None), + 'new_repo_pos': RepositoryPosition('111', u"Rechnungspr\xfcfungskommission", None), 'new_number': '1', 'new_parent_position': '11', 'new_parent_uid': self.leaf_repofolder.UID(), @@ -379,7 +379,7 @@ def test_repository_excel_analyser_os_test_invalid(self): 'new_position_parent_guid': None, 'new_position_parent_position': None, 'new_title': None, - 'old_item': OperationItem('2', u"Rechnungspr\xfcfungskommission", None), + 'old_repo_pos': RepositoryPosition('2', u"Rechnungspr\xfcfungskommission", None), 'permissions': None, 'repository_depth_violated': False, 'uid': self.empty_repofolder.UID()}, @@ -391,7 +391,7 @@ def test_repository_excel_analyser_os_test_invalid(self): {'is_valid': False, 'leaf_node_violated': False, 'merge_into': None, - 'new_item': OperationItem('41', u"Spinn\xe4nnetzregistrar", None), + 'new_repo_pos': RepositoryPosition('41', u"Spinn\xe4nnetzregistrar", None), 'new_number': '1', 'new_parent_position': '4', 'new_parent_uid': None, @@ -399,7 +399,7 @@ def test_repository_excel_analyser_os_test_invalid(self): 'new_position_parent_guid': None, 'new_position_parent_position': None, 'new_title': None, - 'old_item': OperationItem('3', u"Spinn\xe4nnetzregistrar", None), + 'old_repo_pos': RepositoryPosition('3', u"Spinn\xe4nnetzregistrar", None), 'permissions': None, 'repository_depth_violated': False, 'uid': self.inactive_repofolder.UID()}, @@ -413,7 +413,7 @@ def test_repository_excel_analyser_os_test_invalid(self): {'is_valid': False, 'leaf_node_violated': False, 'merge_into': None, - 'new_item': OperationItem('51', 'New leaf', None), + 'new_repo_pos': RepositoryPosition('51', 'New leaf', None), 'new_number': None, 'new_parent_position': None, 'new_parent_uid': None, @@ -421,7 +421,7 @@ def test_repository_excel_analyser_os_test_invalid(self): 'new_position_parent_guid': None, 'new_position_parent_position': '5', 'new_title': None, - 'old_item': OperationItem(None, None, None), + 'old_repo_pos': RepositoryPosition(None, None, None), 'permissions': {'add': [], 'block_inheritance': False, 'close': [], @@ -441,7 +441,7 @@ def test_repository_excel_analyser_os_test_invalid(self): {'is_valid': False, 'leaf_node_violated': True, 'merge_into': None, - 'new_item': OperationItem('112', 'Second new leaf', None), + 'new_repo_pos': RepositoryPosition('112', 'Second new leaf', None), 'new_number': None, 'new_parent_position': None, 'new_parent_uid': None, @@ -449,7 +449,7 @@ def test_repository_excel_analyser_os_test_invalid(self): 'new_position_parent_guid': None, 'new_position_parent_position': '11', 'new_title': None, - 'old_item': OperationItem(None, None, None), + 'old_repo_pos': RepositoryPosition(None, None, None), 'permissions': {'add': [], 'block_inheritance': False, 'close': [], @@ -469,7 +469,7 @@ def test_repository_excel_analyser_os_test_invalid(self): {'is_valid': False, 'leaf_node_violated': False, 'merge_into': None, - 'new_item': OperationItem('1211', 'fourth level', None), + 'new_repo_pos': RepositoryPosition('1211', 'fourth level', None), 'new_number': None, 'new_parent_position': None, 'new_parent_uid': None, @@ -477,7 +477,7 @@ def test_repository_excel_analyser_os_test_invalid(self): 'new_position_parent_guid': parent_guid, 'new_position_parent_position': None, 'new_title': None, - 'old_item': OperationItem(None, None, None), + 'old_repo_pos': RepositoryPosition(None, None, None), 'permissions': {'add': [], 'block_inheritance': False, 'close': [], @@ -615,7 +615,7 @@ def test_repository_migrator_change_description(self): {'is_valid': True, 'leaf_node_violated': False, 'merge_into': None, - 'new_item': OperationItem(1, u"F\xfchrung", "New description"), + 'new_repo_pos': RepositoryPosition(1, u"F\xfchrung", "New description"), 'new_number': None, 'new_parent_position': None, 'new_parent_uid': None, @@ -623,7 +623,7 @@ def test_repository_migrator_change_description(self): 'new_position_parent_position': None, 'new_position_guid': None, 'new_title': None, - 'old_item': OperationItem(1, u"F\xfchrung", u"Alles zum Thema F\xfchrung."), + 'old_repo_pos': RepositoryPosition(1, u"F\xfchrung", u"Alles zum Thema F\xfchrung."), 'permissions': None, 'repository_depth_violated': False, 'uid': self.branch_repofolder.UID()}, @@ -649,7 +649,7 @@ def test_repository_migrator_change_refnum(self): {'is_valid': True, 'leaf_node_violated': False, 'merge_into': None, - 'new_item': OperationItem(0, u"F\xfchrung", u"Alles zum Thema F\xfchrung."), + 'new_repo_pos': RepositoryPosition(0, u"F\xfchrung", u"Alles zum Thema F\xfchrung."), 'new_number': '0', 'new_parent_position': None, 'new_parent_uid': None, @@ -657,7 +657,7 @@ def test_repository_migrator_change_refnum(self): 'new_position_parent_position': None, 'new_position_guid': None, 'new_title': None, - 'old_item': OperationItem(1, u"F\xfchrung", u"Alles zum Thema F\xfchrung."), + 'old_repo_pos': RepositoryPosition(1, u"F\xfchrung", u"Alles zum Thema F\xfchrung."), 'permissions': None, 'repository_depth_violated': False, 'uid': self.branch_repofolder.UID()}, @@ -666,7 +666,7 @@ def test_repository_migrator_change_refnum(self): {'is_valid': True, 'leaf_node_violated': False, 'merge_into': None, - 'new_item': OperationItem('01', u'Vertr\xe4ge und Vereinbarungen', None), + 'new_repo_pos': RepositoryPosition('01', u'Vertr\xe4ge und Vereinbarungen', None), 'new_number': None, 'new_parent_position': None, 'new_parent_uid': None, @@ -674,7 +674,7 @@ def test_repository_migrator_change_refnum(self): 'new_position_parent_position': None, 'new_position_guid': None, 'new_title': None, - 'old_item': OperationItem('11', u'Vertr\xe4ge und Vereinbarungen', None), + 'old_repo_pos': RepositoryPosition('11', u'Vertr\xe4ge und Vereinbarungen', None), 'permissions': None, 'repository_depth_violated': False, 'uid': self.leaf_repofolder.UID()}, @@ -712,7 +712,7 @@ def test_repository_migrator_change_title(self): {'is_valid': True, 'leaf_node_violated': False, 'merge_into': None, - 'new_item': OperationItem(1, "New title", u"Alles zum Thema F\xfchrung."), + 'new_repo_pos': RepositoryPosition(1, "New title", u"Alles zum Thema F\xfchrung."), 'new_number': None, 'new_parent_position': None, 'new_parent_uid': None, @@ -720,7 +720,7 @@ def test_repository_migrator_change_title(self): 'new_position_parent_position': None, 'new_position_guid': None, 'new_title': u'New title', - 'old_item': OperationItem(1, u"F\xfchrung", u"Alles zum Thema F\xfchrung."), + 'old_repo_pos': RepositoryPosition(1, u"F\xfchrung", u"Alles zum Thema F\xfchrung."), 'permissions': None, 'repository_depth_violated': False, 'uid': self.branch_repofolder.UID()}, @@ -764,7 +764,7 @@ def test_repository_migrator_move(self): {'is_valid': True, 'leaf_node_violated': False, 'merge_into': None, - 'new_item': OperationItem(21, u'Vertr\xe4ge und Vereinbarungen', None), + 'new_repo_pos': RepositoryPosition(21, u'Vertr\xe4ge und Vereinbarungen', None), 'new_number': '1', 'new_parent_position': '2', 'new_parent_uid': self.empty_repofolder.UID(), @@ -772,7 +772,7 @@ def test_repository_migrator_move(self): 'new_position_parent_position': None, 'new_position_guid': None, 'new_title': None, - 'old_item': OperationItem(11, u'Vertr\xe4ge und Vereinbarungen', None), + 'old_repo_pos': RepositoryPosition(11, u'Vertr\xe4ge und Vereinbarungen', None), 'permissions': None, 'repository_depth_violated': False, 'uid': self.leaf_repofolder.UID()}, @@ -820,7 +820,7 @@ def test_repository_migrator_create_leaf(self): {'is_valid': True, 'leaf_node_violated': False, 'merge_into': None, - 'new_item': OperationItem(12, u'New leaf', 'New description'), + 'new_repo_pos': RepositoryPosition(12, u'New leaf', 'New description'), 'new_number': None, 'new_parent_position': None, 'new_parent_uid': None, @@ -828,7 +828,7 @@ def test_repository_migrator_create_leaf(self): 'new_position_parent_position': '1', 'new_position_guid': guid, 'new_title': None, - 'old_item': OperationItem(), + 'old_repo_pos': RepositoryPosition(), 'permissions': { 'add': [u'group1'], 'block_inheritance': True, @@ -878,7 +878,7 @@ def test_repository_migrator_create_branch_and_leaf_in_reporoot(self): {'is_valid': True, 'leaf_node_violated': False, 'merge_into': None, - 'new_item': OperationItem(4, u'New branch', 'New description'), + 'new_repo_pos': RepositoryPosition(4, u'New branch', 'New description'), 'new_number': None, 'new_parent_position': None, 'new_parent_uid': None, @@ -886,7 +886,7 @@ def test_repository_migrator_create_branch_and_leaf_in_reporoot(self): 'new_position_parent_position': '', 'new_position_guid': branch_guid, 'new_title': None, - 'old_item': OperationItem(), + 'old_repo_pos': RepositoryPosition(), 'permissions': {'add': [], 'block_inheritance': False, 'close': [], @@ -902,7 +902,7 @@ def test_repository_migrator_create_branch_and_leaf_in_reporoot(self): {'is_valid': True, 'leaf_node_violated': False, 'merge_into': None, - 'new_item': OperationItem(41, u'New leaf', 'New leaf description'), + 'new_repo_pos': RepositoryPosition(41, u'New leaf', 'New leaf description'), 'new_number': None, 'new_parent_position': None, 'new_parent_uid': None, @@ -910,7 +910,7 @@ def test_repository_migrator_create_branch_and_leaf_in_reporoot(self): 'new_position_parent_position': None, 'new_position_guid': guid, 'new_title': None, - 'old_item': OperationItem(), + 'old_repo_pos': RepositoryPosition(), 'permissions': {'add': [], 'block_inheritance': False, 'close': [], @@ -971,7 +971,7 @@ def test_repository_migrator_create_in_moved_repofolder(self): {'is_valid': True, 'leaf_node_violated': False, 'merge_into': None, - 'new_item': OperationItem(12, u"Rechnungspr\xfcfungskommission", None), + 'new_repo_pos': RepositoryPosition(12, u"Rechnungspr\xfcfungskommission", None), 'new_number': '2', 'new_parent_position': '1', 'new_parent_uid': self.branch_repofolder.UID(), @@ -979,7 +979,7 @@ def test_repository_migrator_create_in_moved_repofolder(self): 'new_position_parent_position': None, 'new_position_guid': None, 'new_title': None, - 'old_item': OperationItem(2, u"Rechnungspr\xfcfungskommission", None), + 'old_repo_pos': RepositoryPosition(2, u"Rechnungspr\xfcfungskommission", None), 'permissions': None, 'repository_depth_violated': False, 'uid': self.empty_repofolder.UID()}, @@ -990,7 +990,7 @@ def test_repository_migrator_create_in_moved_repofolder(self): {'is_valid': True, 'leaf_node_violated': False, 'merge_into': None, - 'new_item': OperationItem(121, u'New leaf', 'New description'), + 'new_repo_pos': RepositoryPosition(121, u'New leaf', 'New description'), 'new_number': None, 'new_parent_position': None, 'new_parent_uid': None, @@ -998,7 +998,7 @@ def test_repository_migrator_create_in_moved_repofolder(self): 'new_position_parent_guid': None, 'new_position_parent_position': '2', 'new_title': None, - 'old_item': OperationItem(), + 'old_repo_pos': RepositoryPosition(), 'permissions': {'add': [], 'block_inheritance': False, 'close': [], @@ -1067,7 +1067,7 @@ def test_repository_migrator_move_into_created_repofolder(self): {'is_valid': True, 'leaf_node_violated': False, 'merge_into': None, - 'new_item': OperationItem(4, u'New branch', 'New description'), + 'new_repo_pos': RepositoryPosition(4, u'New branch', 'New description'), 'new_number': None, 'new_parent_position': None, 'new_parent_uid': None, @@ -1075,7 +1075,7 @@ def test_repository_migrator_move_into_created_repofolder(self): 'new_position_parent_guid': reporoot_guid, 'new_position_parent_position': '', 'new_title': None, - 'old_item': OperationItem(), + 'old_repo_pos': RepositoryPosition(), 'permissions': {'add': [], 'block_inheritance': False, 'close': [], @@ -1091,7 +1091,7 @@ def test_repository_migrator_move_into_created_repofolder(self): {'is_valid': True, 'leaf_node_violated': False, 'merge_into': None, - 'new_item': OperationItem(41, u'Vertr\xe4ge und Vereinbarungen', None), + 'new_repo_pos': RepositoryPosition(41, u'Vertr\xe4ge und Vereinbarungen', None), 'new_number': '1', 'new_parent_position': '4', 'new_parent_uid': branch_guid, @@ -1099,7 +1099,7 @@ def test_repository_migrator_move_into_created_repofolder(self): 'new_position_parent_guid': None, 'new_position_parent_position': None, 'new_title': None, - 'old_item': OperationItem(11, u'Vertr\xe4ge und Vereinbarungen', None), + 'old_repo_pos': RepositoryPosition(11, u'Vertr\xe4ge und Vereinbarungen', None), 'permissions': None, 'repository_depth_violated': False, 'uid': self.leaf_repofolder.UID()}, @@ -1157,7 +1157,7 @@ def test_repository_migrator_move_into_repository_root(self): {'is_valid': True, 'leaf_node_violated': False, 'merge_into': None, - 'new_item': OperationItem(4, u'Vertr\xe4ge und Vereinbarungen', None), + 'new_repo_pos': RepositoryPosition(4, u'Vertr\xe4ge und Vereinbarungen', None), 'new_number': '4', 'new_parent_position': '', 'new_parent_uid': self.repository_root.UID(), @@ -1165,7 +1165,7 @@ def test_repository_migrator_move_into_repository_root(self): 'new_position_parent_guid': None, 'new_position_parent_position': None, 'new_title': None, - 'old_item': OperationItem(11, u'Vertr\xe4ge und Vereinbarungen', None), + 'old_repo_pos': RepositoryPosition(11, u'Vertr\xe4ge und Vereinbarungen', None), 'permissions': None, 'repository_depth_violated': False, 'uid': self.leaf_repofolder.UID()}, @@ -1232,7 +1232,7 @@ def test_repository_migrator_move_into_moved_repofolder(self): {'is_valid': True, 'leaf_node_violated': False, 'merge_into': None, - 'new_item': OperationItem(12, u"Rechnungspr\xfcfungskommission", None), + 'new_repo_pos': RepositoryPosition(12, u"Rechnungspr\xfcfungskommission", None), 'new_number': '2', 'new_parent_position': '1', 'new_parent_uid': self.branch_repofolder.UID(), @@ -1240,7 +1240,7 @@ def test_repository_migrator_move_into_moved_repofolder(self): 'new_position_parent_guid': None, 'new_position_parent_position': None, 'new_title': None, - 'old_item': OperationItem(2, u"Rechnungspr\xfcfungskommission", ''), + 'old_repo_pos': RepositoryPosition(2, u"Rechnungspr\xfcfungskommission", ''), 'permissions': None, 'repository_depth_violated': False, 'uid': self.empty_repofolder.UID()}, @@ -1249,7 +1249,7 @@ def test_repository_migrator_move_into_moved_repofolder(self): {'is_valid': True, 'leaf_node_violated': False, 'merge_into': None, - 'new_item': OperationItem(121, u'Vertr\xe4ge und Vereinbarungen', ''), + 'new_repo_pos': RepositoryPosition(121, u'Vertr\xe4ge und Vereinbarungen', ''), 'new_number': '1', 'new_parent_position': '12', 'new_parent_uid': self.empty_repofolder.UID(), @@ -1257,7 +1257,7 @@ def test_repository_migrator_move_into_moved_repofolder(self): 'new_position_parent_guid': None, 'new_position_parent_position': None, 'new_title': None, - 'old_item': OperationItem(11, u'Vertr\xe4ge und Vereinbarungen', None), + 'old_repo_pos': RepositoryPosition(11, u'Vertr\xe4ge und Vereinbarungen', None), 'permissions': None, 'repository_depth_violated': False, 'uid': self.leaf_repofolder.UID()}, @@ -1444,7 +1444,7 @@ def test_repository_migrator_create_sets_permissions_correctly(self): {'is_valid': True, 'leaf_node_violated': False, 'merge_into': None, - 'new_item': OperationItem(12, u'New leaf', 'New description'), + 'new_repo_pos': RepositoryPosition(12, u'New leaf', 'New description'), 'new_number': None, 'new_parent_position': None, 'new_parent_uid': None, @@ -1452,7 +1452,7 @@ def test_repository_migrator_create_sets_permissions_correctly(self): 'new_position_parent_position': '1', 'new_position_guid': guid, 'new_title': None, - 'old_item': OperationItem(), + 'old_repo_pos': RepositoryPosition(), 'permissions': { 'add': [u'group1'], 'block_inheritance': True, @@ -1510,7 +1510,7 @@ def test_repository_migrator_merge_into_existing_repofolder(self): {'is_valid': True, 'leaf_node_violated': False, 'merge_into': self.empty_repofolder.UID(), - 'new_item': OperationItem(2, u'Vertr\xe4ge und Vereinbarungen', None), + 'new_repo_pos': RepositoryPosition(2, u'Vertr\xe4ge und Vereinbarungen', None), 'new_number': None, 'new_parent_position': None, 'new_parent_uid': None, @@ -1518,7 +1518,7 @@ def test_repository_migrator_merge_into_existing_repofolder(self): 'new_position_parent_guid': None, 'new_position_parent_position': None, 'new_title': None, - 'old_item': OperationItem(11, u'Vertr\xe4ge und Vereinbarungen', None), + 'old_repo_pos': RepositoryPosition(11, u'Vertr\xe4ge und Vereinbarungen', None), 'permissions': None, 'repository_depth_violated': False, 'uid': self.leaf_repofolder.UID()}, @@ -1579,7 +1579,7 @@ def test_repository_migrator_merge_into_created_repofolder(self): {'is_valid': True, 'leaf_node_violated': False, 'merge_into': None, - 'new_item': OperationItem(4, u'Vertr\xe4ge und Vereinbarungen', None), + 'new_repo_pos': RepositoryPosition(4, u'Vertr\xe4ge und Vereinbarungen', None), 'new_number': None, 'new_parent_position': None, 'new_parent_uid': None, @@ -1587,7 +1587,7 @@ def test_repository_migrator_merge_into_created_repofolder(self): 'new_position_parent_guid': reporoot_guid, 'new_position_parent_position': '', 'new_title': None, - 'old_item': OperationItem(None, None, None), + 'old_repo_pos': RepositoryPosition(None, None, None), 'permissions': {'add': [], 'block_inheritance': False, 'close': [], @@ -1603,7 +1603,7 @@ def test_repository_migrator_merge_into_created_repofolder(self): {'is_valid': True, 'leaf_node_violated': False, 'merge_into': guid, - 'new_item': OperationItem(4, u'Vertr\xe4ge und Vereinbarungen', None), + 'new_repo_pos': RepositoryPosition(4, u'Vertr\xe4ge und Vereinbarungen', None), 'new_number': None, 'new_parent_position': None, 'new_parent_uid': None, @@ -1611,7 +1611,7 @@ def test_repository_migrator_merge_into_created_repofolder(self): 'new_position_parent_guid': None, 'new_position_parent_position': None, 'new_title': None, - 'old_item': OperationItem(11, u'Vertr\xe4ge und Vereinbarungen', None), + 'old_repo_pos': RepositoryPosition(11, u'Vertr\xe4ge und Vereinbarungen', None), 'permissions': None, 'repository_depth_violated': False, 'uid': self.leaf_repofolder.UID()},