mdediana commented on pull request #9668:
URL: https://github.com/apache/airflow/pull/9668#issuecomment-653927061


   I put the mocks back. One small problem is that I had to add 
`mock_get_creds_and_project_id.return_value = ('creds', 'project_id')` to every 
test, otherwise the line `credentials, _ = get_credentials_and_project_id(` in 
`StackdriverTaskHandler._client` would fail unpacking the return value. The 
unittest.mock 
[docs](https://docs.python.org/3.5/library/unittest.mock-examples.html#applying-the-same-patch-to-every-test-method)
 suggest a solution, it eliminates this duplication but I think it may make 
code harder to read.


----------------------------------------------------------------
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:
[email protected]


Reply via email to