david30907d commented on a change in pull request #21542:
URL: https://github.com/apache/airflow/pull/21542#discussion_r805308244
##########
File path: tests/providers/google/cloud/hooks/test_bigquery.py
##########
@@ -946,6 +947,16 @@ def test_dbapi_get_sqlalchemy_engine(self):
):
self.hook.get_sqlalchemy_engine()
+ @mock.patch(
+
'airflow.providers.google.common.hooks.base_google.GoogleBaseHook._get_credentials_and_project_id',
+ return_value=(CREDENTIALS, PROJECT_ID),
+ )
+ def test_dbapi_get_sqlalchemy_engine_success(
+ self, mock_insert, mock_get_service, mock_get_creds_and_proj_id
+ ):
+ bq_hook = BigQueryHook(use_legacy_sql=False)
+ assert isinstance(bq_hook.get_sqlalchemy_engine(),
sqlalchemy.engine.base.Engine) is True
Review comment:
added a test case for it
--
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]