@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_many(self, mock_insert, _):
    bq_cursor = self.hook.get_cursor()
    bq_cursor.executemany('SELECT %(foo)s', [{'foo': 'bar'}, {'foo': 'baz'}])
    assert (mock_insert.call_count == 2)
    assert mock_insert.has_calls(mock.call(configuration={'query': {'query': "SELECT 'bar'", 'priority': 'INTERACTIVE', 'useLegacySql': True, 'schemaUpdateOptions': []}}, project_id=PROJECT_ID), mock.call(configuration={'query': {'query': "SELECT 'baz'", 'priority': 'INTERACTIVE', 'useLegacySql': True, 'schemaUpdateOptions': []}}, 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_many(self, mock_insert, _):
    bq_cursor = self.hook.get_cursor()
    bq_cursor.executemany('SELECT %(foo)s', [{'foo': 'bar'}, {'foo': 'baz'}])
    assert (mock_insert.call_count == 2)
    assert mock_insert.has_calls(mock.call(configuration={'query': {'query': "SELECT 'bar'", 'priority': 'INTERACTIVE', 'useLegacySql': True, 'schemaUpdateOptions': []}}, project_id=PROJECT_ID), mock.call(configuration={'query': {'query': "SELECT 'baz'", 'priority': 'INTERACTIVE', 'useLegacySql': True, 'schemaUpdateOptions': []}}, project_id=PROJECT_ID))