Skip to content

Commit

Permalink
Added unauthorized test cases
Browse files Browse the repository at this point in the history
  • Loading branch information
dlpzx committed Nov 26, 2024
1 parent 5180c64 commit 239bcc8
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions tests_new/integration_tests/modules/feed/test_feed.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,3 +42,15 @@ def test_get_feed_invalid(client1, session_s3_dataset1):
assert_that(get_feed).raises(GqlError).when_called_with(client1, None, S3_DATASET_TARGET_TYPE).contains(
'targetUri', 'must not be null'
)


def test_post_feed_message_unauthorized(client2, session_s3_dataset1):
assert_that(post_feed_message).raises(GqlError).when_called_with(
client2, session_s3_dataset1.datasetUri, S3_DATASET_TARGET_TYPE, 'message'
).contains('UnauthorizedOperation', 'GET_DATASET', session_s3_dataset1.datasetUri)


def test_get_feed_unauthorized(client2, session_s3_dataset1):
assert_that(get_feed).raises(GqlError).when_called_with(
client2, session_s3_dataset1.datasetUri, S3_DATASET_TARGET_TYPE
).contains('UnauthorizedOperation', 'GET_DATASET', session_s3_dataset1.datasetUri)

0 comments on commit 239bcc8

Please sign in to comment.