ensure order of permissions in tests
This commit is contained in:
parent
482de8690c
commit
09a502d48d
|
@ -1160,7 +1160,8 @@ class ProcessInstanceProcessor:
|
|||
return the_status
|
||||
|
||||
# inspiration from https://github.com/collectiveidea/delayed_job_active_record/blob/master/lib/delayed/backend/active_record.rb
|
||||
# could consider borrowing their "cleanup all my locks when the app quits" idea as well and implement via https://docs.python.org/3/library/atexit.html
|
||||
# could consider borrowing their "cleanup all my locks when the app quits" idea as well and
|
||||
# implement via https://docs.python.org/3/library/atexit.html
|
||||
def lock_process_instance(self, lock_prefix: str) -> None:
|
||||
locked_by = f"{lock_prefix}_{current_app.config['PROCESS_UUID']}"
|
||||
current_time_in_seconds = round(time.time())
|
||||
|
|
|
@ -57,4 +57,6 @@ class TestGetAllPermissions(BaseTest):
|
|||
]
|
||||
|
||||
permissions = GetAllPermissions().run(script_attributes_context)
|
||||
assert permissions == expected_permissions
|
||||
sorted_permissions = sorted(permissions, key=lambda x: x['uri'] or '')
|
||||
sorted_expected_permissions = sorted(expected_permissions, key=lambda x: x['uri'] or '')
|
||||
assert sorted_permissions == sorted_expected_permissions
|
||||
|
|
Loading…
Reference in New Issue