Skip to content

Commit

Permalink
Add test that refnum mapping is correct after OS migration.
Browse files Browse the repository at this point in the history
  • Loading branch information
Niklaus Johner committed Jun 22, 2022
1 parent 1de4287 commit 006cbcb
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions opengever/bundle/tests/test_os_migration.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
from ftw.builder import create
from opengever.base.indexes import sortable_title
from opengever.base.interfaces import IReferenceNumber
from opengever.base.interfaces import IReferenceNumberPrefix
from opengever.base.role_assignments import ASSIGNMENT_VIA_SHARING
from opengever.base.role_assignments import RoleAssignmentManager
from opengever.base.role_assignments import SharingRoleAssignment
Expand Down Expand Up @@ -1077,6 +1078,13 @@ def test_repository_migrator_handles_temporary_dupplicate_position(self):
migrator = RepositoryMigrator(analyser.analysed_rows)
migrator.run()

self.assertEqual(
[{'active': True, 'prefix': u'1', 'title': u'new pos 1'},
{'active': True, 'prefix': u'2', 'title': u'Rechnungspr\xfcfungskommission'},
{'active': True, 'prefix': u'3', 'title': u'Spinn\xe4nnetzregistrar'},
{'active': True, 'prefix': u'4', 'title': u'F\xfchrung'}],
IReferenceNumberPrefix(self.repository_root).get_number_mapping())

def get_allowed_users(self, obj):
return filter(lambda x: x.startswith("user:"),
self.get_catalog_indexdata(obj)['allowedRolesAndUsers'])
Expand Down

0 comments on commit 006cbcb

Please sign in to comment.