Skip to content

Commit

Permalink
updateslack tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Yuyuutsu committed Dec 17, 2024
1 parent 1dd1468 commit 4b07421
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions tests/test_slack_notification.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,7 @@ def test_post_slack_notification_with_no_content_and_ok_response_raises_no_error


def test_post_slack_notification_with_bad_response_raises_error(mocker):
mocker.patch("scripts.slack_notification.get_channel_id", return_value="C12345")
mocker.patch(
"slack_sdk.web.client.WebClient.files_upload_v2", return_value={"ok": False}
)
Expand All @@ -139,8 +140,8 @@ def test_post_slack_notification_with_bad_response_raises_error(mocker):
)


def test_post_slack_notification_with_api_error_exits():

def test_post_slack_notification_with_api_error_exits(mocker):
mocker.patch("scripts.slack_notification.get_channel_id", return_value="C12345")
with pytest.raises(SystemExit):
post_slack_notification(
slack_auth_token="token",
Expand Down

0 comments on commit 4b07421

Please sign in to comment.