@parameterized.expand([(True,), (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_api_resource_configs(self, bool_val, mock_insert, _):
    self.hook.run_query('query', api_resource_configs={'query': {'useQueryCache': bool_val}})
    (_, kwargs) = mock_insert.call_args
    assert (kwargs['configuration']['query']['useQueryCache'] is bool_val)
    assert (kwargs['configuration']['query']['useLegacySql'] is True)
@parameterized.expand([(True,), (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_api_resource_configs(self, bool_val, mock_insert, _):
    self.hook.run_query('query', api_resource_configs={'query': {'useQueryCache': bool_val}})
    (_, kwargs) = mock_insert.call_args
    assert (kwargs['configuration']['query']['useQueryCache'] is bool_val)
    assert (kwargs['configuration']['query']['useLegacySql'] is True)