You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2021/02/18 12:46:27 UTC

[GitHub] [airflow] Khrol commented on a change in pull request #14289: Don't allow SlackHook accept *args

Khrol commented on a change in pull request #14289:
URL: https://github.com/apache/airflow/pull/14289#discussion_r578388596



##########
File path: tests/providers/slack/hooks/test_slack.py
##########
@@ -120,7 +120,7 @@ def test_call_with_failure(self, slack_client_class_mock):
         test_api_params = {'key1': 'value1', 'key2': 'value2'}
 
         with pytest.raises(SlackApiError):
-            slack_hook.call(test_method, test_api_params)

Review comment:
       `slack_client_mock.api_call = mock.Mock(side_effect=expected_exception)`
   
   `api_call` method was mocked and mock didn't 100% mimic original signature with only one positional argument. So the test was green before my change.




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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org