def test_cycle_string(): plaintext = os.urandom(1024) config = read_test_config() cmk_arn = get_cmk_arn(config) botocore_session = setup_botocore_session(config) cycle_string(key_arn=cmk_arn, source_plaintext=plaintext, botocore_session=botocore_session)
def test_cycle_file(): cmk_arn = get_cmk_arn() _handle, filename = tempfile.mkstemp() with open(filename, 'wb') as f: f.write(os.urandom(1024)) try: new_files = cycle_file(key_arn=cmk_arn, source_plaintext_filename=filename, botocore_session=botocore.session.Session()) for f in new_files: os.remove(f) finally: os.remove(filename)
def test_cycle_string(): plaintext = os.urandom(1024) cmk_arn = get_cmk_arn() cycle_string(key_arn=cmk_arn, source_plaintext=plaintext, botocore_session=botocore.session.Session())
def test_encrypt_with_caching(): cmk_arn = get_cmk_arn() encrypt_with_caching(kms_cmk_arn=cmk_arn, max_age_in_cache=10.0, cache_capacity=10)
def test_encrypt_with_caching(): config = read_test_config() cmk_arn = get_cmk_arn(config) encrypt_with_caching(kms_cmk_arn=cmk_arn, max_age_in_cache=10.0, cache_capacity=10)