Skip to content

Commit f1a969b

Browse files
author
Niklaus Johner
committed
Add test for changing refnumber of child of moved repofolder.
1 parent c4a5b0f commit f1a969b

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed
Binary file not shown.

opengever/bundle/tests/test_os_migration.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1280,6 +1280,17 @@ def test_repository_migrator_move_into_moved_repofolder(self):
12801280
obj, parent_path=self.empty_repofolder.absolute_url_path(),
12811281
parent_refnum='Client1 12')
12821282

1283+
def test_repository_migrator_move_and_change_child_refnum(self):
1284+
self.login(self.manager)
1285+
migration_file = resource_filename('opengever.bundle.tests', 'assets/os_migration/os_test_move_and_change_child_refnum.xlsx')
1286+
analysis_file = resource_filename('opengever.bundle.tests', 'assets/os_migration/test_analysis.xlsx')
1287+
analyser = RepositoryExcelAnalyser(migration_file, analysis_file)
1288+
analyser.analyse()
1289+
1290+
migrator = RepositoryMigrator(analyser.analysed_rows)
1291+
# This will validate that the reference numbers were set correctly
1292+
migrator.run()
1293+
12831294
def get_allowed_users(self, obj):
12841295
return filter(lambda x: x.startswith("user:"),
12851296
self.get_catalog_indexdata(obj)['allowedRolesAndUsers'])

0 commit comments

Comments
 (0)