shahar1 commented on PR #38169: URL: https://github.com/apache/airflow/pull/38169#issuecomment-2013463439
> cloud/hooks/test_bigquery.py > I need some help figuring out how to write a test. I see that there is a cloud/operators/test_bigquery.py file with a `impersonation_chain` call but no `impersonation_chain` call in cloud/hooks/test_bigquery.py > > The other example I looked at > > https://github.com/apache/airflow/blob/952d04a3c10a7b511e4c39528d6f7aca7d729df6/tests/providers/google/cloud/operators/test_cloud_storage_transfer_service.py#L265 > > > but I'm not quite sure what that line is doing You could mock the impersonation chain as done in other tests of GCP hooks (`hooks/test_compute`, for example; there are more). As for the other example, it is called `google_impersonation_chain` to differentiate it from a similar parameter in the target/source cloud platform of the transfer operator (which is not necessarily GCP). -- 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-unsubscr...@airflow.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org