@pytest.mark.parametrize('scenario', _generate_test_cases())
def test_decrypt_from_file(scenario):
    'Tests decrypt from known good files.'
    with open(scenario.ciphertext_filename, 'rb') as infile:
        ciphertext = infile.read()
    with open(scenario.plaintext_filename, 'rb') as infile:
        plaintext = infile.read()
    key_provider = StaticStoredMasterKeyProvider()
    key_provider.add_master_keys_from_list(scenario.key_ids)
    (decrypted_ciphertext, _header) = aws_encryption_sdk.decrypt(source=ciphertext, key_provider=key_provider)
    assert (decrypted_ciphertext == plaintext)
Tests decrypt from known good files.
@pytest.mark.parametrize('scenario', _generate_test_cases())
def test_decrypt_from_file(scenario):
    
    with open(scenario.ciphertext_filename, 'rb') as infile:
        ciphertext = infile.read()
    with open(scenario.plaintext_filename, 'rb') as infile:
        plaintext = infile.read()
    key_provider = StaticStoredMasterKeyProvider()
    key_provider.add_master_keys_from_list(scenario.key_ids)
    (decrypted_ciphertext, _header) = aws_encryption_sdk.decrypt(source=ciphertext, key_provider=key_provider)
    assert (decrypted_ciphertext == plaintext)