Skip to content

Commit 59ec88e

Browse files
author
Lucas McDonald
committed
sync
1 parent 034d12e commit 59ec88e

File tree

2 files changed

+14
-7
lines changed

2 files changed

+14
-7
lines changed

DynamoDbEncryption/runtimes/python/src/aws_dbesdk_dynamodb/encrypted/client.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -421,7 +421,7 @@ def update_item(self, **kwargs):
421421

422422
def execute_statement(self, **kwargs):
423423
"""
424-
Calls ``execute_statement`` on the underlying client if the table is not configured for encryption.
424+
Call ``execute_statement`` on the underlying client if the table is not configured for encryption.
425425
426426
If the table is configured for encryption, this operation will raise DynamoDbEncryptionTransformsException.
427427
@@ -455,7 +455,7 @@ def execute_statement(self, **kwargs):
455455

456456
def execute_transaction(self, **kwargs):
457457
"""
458-
Calls ``execute_transaction`` on the underlying client if the table is not configured for encryption.
458+
Call ``execute_transaction`` on the underlying client if the table is not configured for encryption.
459459
460460
If the table is configured for encryption, this operation will raise DynamoDbEncryptionTransformsException.
461461
@@ -489,7 +489,7 @@ def execute_transaction(self, **kwargs):
489489

490490
def batch_execute_statement(self, **kwargs):
491491
"""
492-
Calls ``batch_execute_statement`` on the underlying client if the table is not configured for encryption.
492+
Call ``batch_execute_statement`` on the underlying client if the table is not configured for encryption.
493493
494494
If the table is configured for encryption, this operation will raise DynamoDbEncryptionTransformsException.
495495
@@ -498,8 +498,8 @@ def batch_execute_statement(self, **kwargs):
498498
https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/dynamodb/client/batch_execute_statement.html
499499
500500
Args:
501-
**kwargs: Keyword arguments to pass to the operation. This matches the boto3 client ``batch_execute_statement``
502-
request syntax.
501+
**kwargs: Keyword arguments to pass to the operation. This matches the boto3 client
502+
``batch_execute_statement`` request syntax.
503503
504504
Returns:
505505
dict: The response from DynamoDB. This matches the boto3 client ``batch_execute_statement`` response syntax.

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

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@
2424
simple_key_dict,
2525
)
2626
from ...requests import (
27+
basic_batch_execute_statement_request_encrypted_table,
28+
basic_batch_execute_statement_request_plaintext_table,
2729
basic_batch_get_item_request_ddb,
2830
basic_batch_get_item_request_dict,
2931
basic_batch_write_item_delete_request_ddb,
@@ -36,8 +38,6 @@
3638
basic_execute_statement_request_plaintext_table,
3739
basic_execute_transaction_request_encrypted_table,
3840
basic_execute_transaction_request_plaintext_table,
39-
basic_batch_execute_statement_request_encrypted_table,
40-
basic_batch_execute_statement_request_plaintext_table,
4141
basic_get_item_request_ddb,
4242
basic_get_item_request_dict,
4343
basic_put_item_request_ddb,
@@ -435,6 +435,7 @@ def test_WHEN_update_item_with_signed_attribute_THEN_raises_DynamoDbEncryptionTr
435435
def execute_uses_encrypted_table(request):
436436
return request.param
437437

438+
438439
@pytest.fixture
439440
def execute_statement_request(execute_uses_encrypted_table):
440441
if execute_uses_encrypted_table:
@@ -461,6 +462,7 @@ def test_WHEN_execute_statement_for_encrypted_table_THEN_raises_DynamoDbEncrypti
461462
else:
462463
pytest.skip("Skipping test for plaintext table; this test is only for encrypted tables")
463464

465+
464466
def test_WHEN_execute_statement_for_plaintext_table_THEN_passes(
465467
client,
466468
execute_statement_request,
@@ -475,6 +477,7 @@ def test_WHEN_execute_statement_for_plaintext_table_THEN_passes(
475477
# Then: Success
476478
assert response["ResponseMetadata"]["HTTPStatusCode"] == 200
477479

480+
478481
@pytest.fixture
479482
def execute_transaction_request(execute_uses_encrypted_table, test_item):
480483
if execute_uses_encrypted_table:
@@ -501,6 +504,7 @@ def test_WHEN_execute_transaction_for_encrypted_table_THEN_raises_DynamoDbEncryp
501504
else:
502505
pytest.skip("Skipping test for plaintext table; this test is only for encrypted tables")
503506

507+
504508
def test_WHEN_execute_transaction_for_plaintext_table_THEN_passes(
505509
client,
506510
execute_transaction_request,
@@ -519,6 +523,7 @@ def test_WHEN_execute_transaction_for_plaintext_table_THEN_passes(
519523
# Then: Success
520524
assert response["ResponseMetadata"]["HTTPStatusCode"] == 200
521525

526+
522527
@pytest.fixture
523528
def batch_execute_statement_request(execute_uses_encrypted_table):
524529
if execute_uses_encrypted_table:
@@ -545,6 +550,7 @@ def test_WHEN_batch_execute_statement_for_encrypted_table_THEN_raises_DynamoDbEn
545550
else:
546551
pytest.skip("Skipping test for plaintext table; this test is only for encrypted tables")
547552

553+
548554
def test_WHEN_batch_execute_statement_for_plaintext_table_THEN_passes(
549555
client,
550556
batch_execute_statement_request,
@@ -559,6 +565,7 @@ def test_WHEN_batch_execute_statement_for_plaintext_table_THEN_passes(
559565
# Then: Success
560566
assert response["ResponseMetadata"]["HTTPStatusCode"] == 200
561567

568+
562569
def test_WHEN_get_paginator_THEN_correct_paginator_is_returned():
563570
"""Test get_paginator for scan and query operations."""
564571
# Given: Encrypted client

0 commit comments

Comments
 (0)