diff --git a/tests_new/integration_tests/modules/notifications/test_notifications.py b/tests_new/integration_tests/modules/notifications/test_notifications.py index 8f95d4fe9..ef9ba3aa9 100644 --- a/tests_new/integration_tests/modules/notifications/test_notifications.py +++ b/tests_new/integration_tests/modules/notifications/test_notifications.py @@ -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) diff --git a/tests_new/integration_tests/modules/shares/queries.py b/tests_new/integration_tests/modules/shares/queries.py index 9f787247d..591a59d27 100644 --- a/tests_new/integration_tests/modules/shares/queries.py +++ b/tests_new/integration_tests/modules/shares/queries.py @@ -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',