Taragolis commented on code in PR #28953:
URL: https://github.com/apache/airflow/pull/28953#discussion_r1071161046
##########
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:
The problem more general, AsyncMock not existed in Python 3.7 and need to
use library which provide backcompat, the way how it done in Google Provider
https://github.com/apache/airflow/blob/207f65b542a8aa212f04a9d252762643cfd67a74/tests/providers/google/cloud/utils/compat.py#L18-L37
You could also have a look this PR:
https://github.com/apache/airflow/pull/28290
--
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]