@mock.patch('airflow.providers.google.cloud.hooks.bigquery.BigQueryHook.get_service')
@mock.patch('airflow.providers.google.cloud.hooks.bigquery.BigQueryHook.insert_job')
def test_run_query_sql_dialect_legacy_with_query_params(self, mock_insert, _):
    params = [{'name': 'param_name', 'parameterType': {'type': 'STRING'}, 'parameterValue': {'value': 'param_value'}}]
    self.hook.run_query('query', use_legacy_sql=False, query_params=params)
    (_, kwargs) = mock_insert.call_args
    assert (kwargs['configuration']['query']['useLegacySql'] is False)
@mock.patch('airflow.providers.google.cloud.hooks.bigquery.BigQueryHook.get_service')
@mock.patch('airflow.providers.google.cloud.hooks.bigquery.BigQueryHook.insert_job')
def test_run_query_sql_dialect_legacy_with_query_params(self, mock_insert, _):
    params = [{'name': 'param_name', 'parameterType': {'type': 'STRING'}, 'parameterValue': {'value': 'param_value'}}]
    self.hook.run_query('query', use_legacy_sql=False, query_params=params)
    (_, kwargs) = mock_insert.call_args
    assert (kwargs['configuration']['query']['useLegacySql'] is False)