MCPcopy Create free account
hub / github.com/apache/arrow / ThrowingKmsClient

Class ThrowingKmsClient

python/pyarrow/tests/parquet/test_encryption.py:352–366  ·  view source on GitHub ↗

A KmsClient implementation that throws exception in wrap/unwrap calls

Source from the content-addressed store, hash-verified

350 kms_connection_config = pe.KmsConnectionConfig()
351
352 class ThrowingKmsClient(pe.KmsClient):
353 """A KmsClient implementation that throws exception in
354 wrap/unwrap calls
355 """
356
357 def __init__(self, config):
358 """Create an InMemoryKmsClient instance."""
359 pe.KmsClient.__init__(self)
360 self.config = config
361
362 def wrap_key(self, key_bytes, master_key_identifier):
363 raise ValueError("Cannot Wrap Key")
364
365 def unwrap_key(self, wrapped_key, master_key_identifier):
366 raise ValueError("Cannot Unwrap Key")
367
368 def kms_factory(kms_connection_configuration):
369 # Exception thrown in wrap/unwrap calls

Callers 1

kms_factoryFunction · 0.85

Calls

no outgoing calls

Tested by 1

kms_factoryFunction · 0.68