Skip to content

Commit f438ed6

Browse files
author
Lucas McDonald
committed
m
1 parent a882ec6 commit f438ed6

File tree

3 files changed

+10
-8
lines changed

3 files changed

+10
-8
lines changed

DynamoDbEncryption/runtimes/python/test/integ/encrypted/test_client.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@
77
from aws_dbesdk_dynamodb.encrypted.client import EncryptedClient
88
from aws_dbesdk_dynamodb.encrypted.paginator import EncryptedPaginator
99

10-
from . import sort_dynamodb_json_lists
11-
1210
from ...constants import (
1311
INTEG_TEST_DEFAULT_DYNAMODB_TABLE_NAME,
1412
INTEG_TEST_DEFAULT_TABLE_CONFIGS,
@@ -45,10 +43,12 @@
4543
basic_transact_write_item_put_request_ddb,
4644
basic_transact_write_item_put_request_dict,
4745
)
46+
from . import sort_dynamodb_json_lists
4847

4948
serializer = TypeSerializer()
5049
deserializer = TypeDeserializer()
5150

51+
5252
# Creates a matrix of tests for each value in param,
5353
# with a user-friendly string for test output:
5454
# expect_standard_dictionaries = True -> "standard_dicts"
@@ -73,6 +73,7 @@ def plaintext_client(expect_standard_dictionaries):
7373
client = boto3.client("dynamodb")
7474
return client
7575

76+
7677
# Creates a matrix of tests for each value in param,
7778
# with a user-friendly string for test output:
7879
# encrypted = True -> "encrypted"
@@ -89,6 +90,7 @@ def client(encrypted, expect_standard_dictionaries):
8990
else:
9091
return plaintext_client(expect_standard_dictionaries)
9192

93+
9294
# Creates a matrix of tests for each value in param,
9395
# with a user-friendly string for test output:
9496
# use_complex_item = True -> "complex_item"
@@ -155,6 +157,7 @@ def get_item_request(expect_standard_dictionaries, test_item):
155157
return {**basic_get_item_request_dict(test_item), "TableName": INTEG_TEST_DEFAULT_DYNAMODB_TABLE_NAME}
156158
return basic_get_item_request_ddb(test_item)
157159

160+
158161
def test_GIVEN_valid_put_and_get_requests_WHEN_put_and_get_THEN_round_trip_passes(
159162
client, put_item_request, get_item_request
160163
):

Examples/runtimes/python/DynamoDBEncryption/src/basic_put_get_example/with_encrypted_client.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,11 @@
2020
)
2121
from aws_cryptographic_material_providers.mpl.references import IKeyring
2222
from aws_dbesdk_dynamodb.encrypted.client import EncryptedClient
23-
from aws_dbesdk_dynamodb.models.dynamodb import (
23+
from aws_dbesdk_dynamodb.structures.dynamodb import (
2424
DynamoDbTableEncryptionConfig,
2525
DynamoDbTablesEncryptionConfig,
2626
)
27-
from aws_dbesdk_dynamodb.models.structured_encryption import (
27+
from aws_dbesdk_dynamodb.structures.structured_encryption import (
2828
CryptoAction,
2929
)
3030

Examples/runtimes/python/DynamoDBEncryption/src/item_encryptor/encrypt_decrypt_example.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,9 @@
3232
DBEAlgorithmSuiteId,
3333
)
3434
from aws_cryptographic_material_providers.mpl.references import IKeyring
35-
35+
from aws_dbesdk_dynamodb.encrypted.item import (
36+
ItemEncryptor,
37+
)
3638
from aws_dbesdk_dynamodb.structures.item_encryptor import (
3739
DecryptItemInput,
3840
DynamoDbItemEncryptorConfig,
@@ -41,9 +43,6 @@
4143
from aws_dbesdk_dynamodb.structures.structured_encryption import (
4244
CryptoAction,
4345
)
44-
from aws_dbesdk_dynamodb.encrypted.item import (
45-
ItemEncryptor,
46-
)
4746

4847

4948
def encrypt_decrypt_example(kms_key_id: str, ddb_table_name: str) -> None:

0 commit comments

Comments
 (0)