@mock.patch('airflow.providers.google.cloud.hooks.bigquery.BigQueryConnection')
@mock.patch('airflow.providers.google.cloud.hooks.bigquery.BigQueryHook._authorize')
@mock.patch('airflow.providers.google.cloud.hooks.bigquery.build')
def test_bigquery_client_creation(self, mock_build, mock_authorize, mock_bigquery_connection):
    result = self.hook.get_conn()
    mock_build.assert_called_once_with('bigquery', 'v2', http=mock_authorize.return_value, cache_discovery=False)
    mock_bigquery_connection.assert_called_once_with(service=mock_build.return_value, project_id=PROJECT_ID, hook=self.hook, use_legacy_sql=self.hook.use_legacy_sql, location=self.hook.location, num_retries=self.hook.num_retries)
    assert (mock_bigquery_connection.return_value == result)
@mock.patch('airflow.providers.google.cloud.hooks.bigquery.BigQueryConnection')
@mock.patch('airflow.providers.google.cloud.hooks.bigquery.BigQueryHook._authorize')
@mock.patch('airflow.providers.google.cloud.hooks.bigquery.build')
def test_bigquery_client_creation(self, mock_build, mock_authorize, mock_bigquery_connection):
    result = self.hook.get_conn()
    mock_build.assert_called_once_with('bigquery', 'v2', http=mock_authorize.return_value, cache_discovery=False)
    mock_bigquery_connection.assert_called_once_with(service=mock_build.return_value, project_id=PROJECT_ID, hook=self.hook, use_legacy_sql=self.hook.use_legacy_sql, location=self.hook.location, num_retries=self.hook.num_retries)
    assert (mock_bigquery_connection.return_value == result)