Skip to content

Commit 6748c2d

Browse files
Fixes last broken test
1 parent 4c1f2bf commit 6748c2d

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

tests/sentry/notifications/notification_action/metric_alert_registry/test_slack_metric_alert_handler.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,10 @@ def test_send_alert_via_np_sends_to_slack_channel(
105105
mock_client_instance.chat_postMessage.assert_called_once()
106106
call_kwargs = mock_client_instance.chat_postMessage.call_args.kwargs
107107
assert call_kwargs["channel"] == "channel123"
108-
blocks = call_kwargs["blocks"]
108+
assert call_kwargs["attachments"] is not None
109+
attachments: list[Any] = call_kwargs["attachments"]
110+
assert len(attachments) == 1
111+
blocks: list[Any] = attachments[0]["blocks"]
109112
assert len(blocks) >= 1
110113
assert blocks[0]["type"] == "section"
111114
assert blocks[0]["text"]["type"] == "mrkdwn"

0 commit comments

Comments
 (0)