maxnathaniel commented on code in PR #28953:
URL: https://github.com/apache/airflow/pull/28953#discussion_r1071210603


##########
tests/providers/telegram/hooks/test_telegram.py:
##########
@@ -128,7 +128,7 @@ def 
test_should_send_message_if_chat_id_is_provided_through_constructor(self, mo
 
     
@mock.patch("airflow.providers.telegram.hooks.telegram.TelegramHook.get_conn")
     def test_should_send_message_if_chat_id_is_provided_in_connection(self, 
mock_get_conn):
-        mock_get_conn.return_value = mock.Mock(password="some_token")
+        mock_get_conn.return_value = mock.AsyncMock(password="some_token")

Review Comment:
   @Taragolis, yes I noticed, at some point today, that Python 3.7 did not 
contain `AsyncMock`. Should I reuse the implementation in Google Provider? I 
had just added 
[this](https://github.com/apache/airflow/pull/28953/files#diff-186f9ce31911e0f300377123cda4f4c7f310a3dbb48c59ce38f5171457022e8eR35).
 But reusing the implementation in Google Provider is probably a better idea.



-- 
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