Skip to content

Commit

Permalink
adda test unauth notification
Browse files Browse the repository at this point in the history
  • Loading branch information
noah-paige committed Nov 21, 2024
1 parent 3c156f7 commit 1a814c3
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,17 @@ def test_read_notification_invalid(client1):
)


def test_read_notification_unauth(client1, client2, persistent_group_share_1):
count_unread = count_unread_notifications(client1)

response = list_notifications(client1)
assert_that(mark_notification_read).raises(GqlError).when_called_with(
client1, response.nodes[0].notificationUri
).contains('UnauthorizedOperation', 'UPDATE NOTIFICATION')

assert_that(count_unread_notifications(client1)).is_equal_to(count_unread)


def test_read_notification(client1, persistent_group_share_1):
count_unread = count_unread_notifications(client1)

Expand Down
15 changes: 0 additions & 15 deletions tests_new/integration_tests/modules/shares/queries.py
Original file line number Diff line number Diff line change
Expand Up @@ -255,21 +255,6 @@ def revoke_share_items(client, shareUri: str, shareItemUris: List[str]):
return response.data.revokeItemsShareObject


def remove_shared_item(client, shareItemUri):
query = {
'operationName': 'RemoveSharedItem',
'variables': {'shareItemUri': shareItemUri},
'query': """
mutation RemoveSharedItem($shareItemUri: String!) {
removeSharedItem(shareItemUri: $shareItemUri)
}
""",
}

response = client.query(query=query)
return response.data.removeSharedItem


def get_s3_consumption_data(client, shareUri: str):
query = {
'operationName': 'getS3ConsumptionData',
Expand Down

0 comments on commit 1a814c3

Please sign in to comment.