generated from ghga-de/microservice-repository-template
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
3241996
commit 8d4897e
Showing
1 changed file
with
8 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -320,11 +320,11 @@ async def test_can_create_request(): | |
assert dao.last_upsert == request | ||
|
||
# the 'publish_request_created' method should have been called, get events for request | ||
expected_event = MockAccessRequestEvent( | ||
request.user_id, request.dataset_id, "created" | ||
) | ||
events = event_publisher.events_for(request=request) | ||
|
||
# there will be exactly 1 'event' published (a call to the dummy publisher) | ||
assert len(events) == 1 | ||
assert events[0].status == "created" | ||
assert events == [expected_event] | ||
|
||
assert access_grants.last_grant == "nothing granted so far" | ||
|
||
|
@@ -554,9 +554,11 @@ async def test_set_status_to_allowed(): | |
assert changed_dict.pop("changed_by") == "[email protected]" | ||
assert changed_dict == original_dict | ||
|
||
expected_event = MockAccessRequestEvent( | ||
changed_request.user_id, changed_request.dataset_id, "allowed" | ||
) | ||
events = event_publisher.events_for(request=changed_request) | ||
assert len(events) == 1 | ||
assert events[0].status == "allowed" | ||
assert events == [expected_event] | ||
|
||
assert ( | ||
access_grants.last_grant == "to [email protected] for new-dataset" | ||
|