@mock.patch('airflow.providers.google.cloud.hooks.bigquery.BigQueryHook.insert_job')
def test_run_query_with_kms(self, mock_insert):
    encryption_configuration = {'kms_key_name': 'projects/p/locations/l/keyRings/k/cryptoKeys/c'}
    self.hook.run_query(sql='query', encryption_configuration=encryption_configuration)
    (_, kwargs) = mock_insert.call_args
    assert (kwargs['configuration']['query']['destinationEncryptionConfiguration'] is encryption_configuration)
@mock.patch('airflow.providers.google.cloud.hooks.bigquery.BigQueryHook.insert_job')
def test_run_query_with_kms(self, mock_insert):
    encryption_configuration = {'kms_key_name': 'projects/p/locations/l/keyRings/k/cryptoKeys/c'}
    self.hook.run_query(sql='query', encryption_configuration=encryption_configuration)
    (_, kwargs) = mock_insert.call_args
    assert (kwargs['configuration']['query']['destinationEncryptionConfiguration'] is encryption_configuration)