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 2022/01/05 08:22:11 UTC

[GitHub] [airflow] uranusjr commented on a change in pull request #20527: Fixed has_calls to assert_has_calls

uranusjr commented on a change in pull request #20527:
URL: https://github.com/apache/airflow/pull/20527#discussion_r778623392



##########
File path: tests/providers/airbyte/hooks/test_airbyte.py
##########
@@ -87,7 +87,7 @@ def test_wait_for_job_error(self, mock_get_job):
             self.hook.wait_for_job(job_id=self.job_id, wait_seconds=0)
 
         calls = [mock.call(job_id=self.job_id), mock.call(job_id=self.job_id)]
-        assert mock_get_job.has_calls(calls)
+        assert mock_get_job.assert_has_calls(calls, any_order=False)

Review comment:
       Shouldn’t this be
   
   ```suggestion
           mock_get_job.assert_has_calls(calls, any_order=False)
   ```
   
   instead? `assert_has_calls` returns None on success, so asserting its return value is entirely backwards.




-- 
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: commits-unsubscribe@airflow.apache.org

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