Audit permissions when adding a user to a service

This is useful information to store for the event, which would be
lost if someone subsequently changed them.

Rather than updating lots of mock assertions, I've replaced them
with a single test / assert at a lower level, which is consistent
with auditing being a non-critical function.
This commit is contained in:
Ben Thorner
2021-07-15 12:13:42 +01:00
parent 171f911237
commit 9fafc092f7
6 changed files with 24 additions and 23 deletions

View File

@@ -49,7 +49,8 @@ def test_create_add_user_to_service_event_calls_events_api(client, mock_events):
kwargs = {
"user_id": str(uuid.uuid4()),
"invited_by_id": str(uuid.uuid4()),
"service_id": str(uuid.uuid4())
"service_id": str(uuid.uuid4()),
"admin_roles": {'manage_templates'},
}
create_add_user_to_service_event(**kwargs)