Lee-W commented on code in PR #56911:
URL: https://github.com/apache/airflow/pull/56911#discussion_r2541589974


##########
providers/discord/tests/unit/discord/notifications/test_discord.py:
##########
@@ -55,3 +55,20 @@ def test_discord_notifier_notify(mock_execute):
     assert notifier.hook.message == "This is a test message"
     assert notifier.hook.avatar_url == "https://example.com/avatar.png";
     assert notifier.hook.tts is False
+
+
[email protected]
+@patch(
+    
"airflow.providers.discord.notifications.discord.DiscordWebhookAsyncHook.execute",
+    new_callable=AsyncMock,
+)
+async def test_async_notifier(mock_async_hook):
+    notifier = DiscordNotifier(
+        discord_conn_id="my_discord_conn_id",
+        text="This is a test message",
+        username="test_user",
+        avatar_url="https://example.com/avatar.png";,
+        tts=False,
+    )
+    await notifier.async_notify({})
+    mock_async_hook.assert_called_once()

Review Comment:
   just updated the example suggestion



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to