@mock.patch('airflow.providers.google.cloud.hooks.bigquery.BigQueryHook.get_service')
@mock.patch('airflow.providers.google.cloud.hooks.bigquery.BigQueryHook.insert_job')
def test_execute_with_parameters(self, mock_insert, _):
    bq_cursor = self.hook.get_cursor()
    bq_cursor.execute('SELECT %(foo)s', {'foo': 'bar'})
    conf = {'query': {'query': "SELECT 'bar'", 'priority': 'INTERACTIVE', 'useLegacySql': True, 'schemaUpdateOptions': []}}
    mock_insert.assert_called_once_with(configuration=conf, project_id=PROJECT_ID)
@mock.patch('airflow.providers.google.cloud.hooks.bigquery.BigQueryHook.get_service')
@mock.patch('airflow.providers.google.cloud.hooks.bigquery.BigQueryHook.insert_job')
def test_execute_with_parameters(self, mock_insert, _):
    bq_cursor = self.hook.get_cursor()
    bq_cursor.execute('SELECT %(foo)s', {'foo': 'bar'})
    conf = {'query': {'query': "SELECT 'bar'", 'priority': 'INTERACTIVE', 'useLegacySql': True, 'schemaUpdateOptions': []}}
    mock_insert.assert_called_once_with(configuration=conf, project_id=PROJECT_ID)