Skip to content

Commit 03ff102

Browse files
author
Lucas McDonald
committed
m
1 parent de81aea commit 03ff102

File tree

4 files changed

+20
-20
lines changed

4 files changed

+20
-20
lines changed

DynamoDbEncryption/runtimes/python/test/requests.py

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -142,15 +142,15 @@ def basic_batch_execute_statement_request_plaintext_table():
142142

143143
# No exhaustive requests are intended to be able to be used as real requests.
144144
# Some parameters conflict with each other when sent to DynamoDB.
145-
# These are only intended to test the conversion of the structure from client to resource format.
145+
# These are only intended to test the conversion of the structure between client and resource formats.
146146

147147

148148
def base_exhaustive_put_item_request(item):
149149
"""
150150
Base structure for exhaustive put_item requests.
151151
This is not intended to be able to be used as a real request.
152152
Some parameters conflict with each other when sent to DynamoDB.
153-
This is only intended to test the conversion of the request from client to resource format.
153+
This is only intended to test the conversion of the request between client and resource formats.
154154
"""
155155
return {
156156
# Expected is legacy, but still in the boto3 docs.
@@ -174,7 +174,7 @@ def base_exhaustive_get_item_request(item):
174174
Base structure for exhaustive get_item requests.
175175
This is not intended to be able to be used as a real request.
176176
Some parameters conflict with each other when sent to DynamoDB.
177-
This is only intended to test the conversion of the request from client to resource format.
177+
This is only intended to test the conversion of the request between client and resource formats.
178178
"""
179179
return {
180180
"ReturnConsumedCapacity": "TOTAL",
@@ -196,7 +196,7 @@ def base_exhaustive_delete_item_request(item):
196196
Base structure for exhaustive delete_item requests.
197197
This is not intended to be able to be used as a real request.
198198
Some parameters conflict with each other when sent to DynamoDB.
199-
This is only intended to test the conversion of the request from client to resource format.
199+
This is only intended to test the conversion of the request between client and resource formats.
200200
"""
201201
return {
202202
"ReturnConsumedCapacity": "TOTAL",
@@ -211,7 +211,7 @@ def base_exhaustive_query_request(item):
211211
Base structure for exhaustive query requests.
212212
This is not intended to be able to be used as a real request.
213213
Some parameters conflict with each other when sent to DynamoDB.
214-
This is only intended to test the conversion of the request from client to resource format.
214+
This is only intended to test the conversion of the request between client and resource formats.
215215
"""
216216
return {
217217
"IndexName": "index_name",
@@ -240,7 +240,7 @@ def base_exhaustive_scan_request(item):
240240
Base structure for exhaustive scan requests.
241241
This is not intended to be able to be used as a real request.
242242
Some parameters conflict with each other when sent to DynamoDB.
243-
This is only intended to test the conversion of the request from client to resource format.
243+
This is only intended to test the conversion of the request between client and resource formats.
244244
"""
245245
return {
246246
"IndexName": "index_name",
@@ -310,7 +310,7 @@ def exhaustive_query_request_ddb(item):
310310
Query request with all possible parameters.
311311
This is not intended to be able to be used as a real request.
312312
Some parameters conflict with each other when sent to DynamoDB.
313-
This is only intended to test the conversion of the request from client to resource format.
313+
This is only intended to test the conversion of the request between client and resource formats.
314314
"""
315315
base = basic_query_request_ddb(item)
316316
additional_keys = base_exhaustive_query_request(item)
@@ -427,7 +427,7 @@ def exhaustive_put_item_request_dict(item):
427427
Get a put_item request in dict format for any item.
428428
This is not intended to be able to be used as a real request.
429429
Some parameters conflict with each other when sent to DynamoDB.
430-
This is only intended to test the conversion of the request from client to resource format.
430+
This is only intended to test the conversion of the request between client and resource formats.
431431
"""
432432
base = basic_put_item_request_dict(item)
433433
# Replace the default ConditionExpression string with a ConditionExpression object
@@ -452,7 +452,7 @@ def exhaustive_get_item_request_dict(item):
452452
Get a get_item request in dict format for any item.
453453
This is not intended to be able to be used as a real request.
454454
Some parameters conflict with each other when sent to DynamoDB.
455-
This is only intended to test the conversion of the request from client to resource format.
455+
This is only intended to test the conversion of the request between client and resource formats.
456456
"""
457457
base = basic_get_item_request_dict(item)
458458
additional_keys = base_exhaustive_get_item_request(item)
@@ -478,7 +478,7 @@ def exhaustive_query_request_dict(item):
478478
Get a query request in dict format for any item.
479479
This is not intended to be able to be used as a real request.
480480
Some parameters conflict with each other when sent to DynamoDB.
481-
This is only intended to test the conversion of the request from client to resource format.
481+
This is only intended to test the conversion of the request between client and resource formats.
482482
"""
483483
base = basic_query_request_dict(item)
484484
additional_keys = base_exhaustive_query_request(item)
@@ -495,7 +495,7 @@ def exhaustive_scan_request_dict(item):
495495
Get a scan request in dict format for any item.
496496
This is not intended to be able to be used as a real request.
497497
Some parameters conflict with each other when sent to DynamoDB.
498-
This is only intended to test the conversion of the request from client to resource format.
498+
This is only intended to test the conversion of the request between client and resource formats.
499499
"""
500500
base = basic_scan_request_dict(item)
501501
additional_keys = base_exhaustive_scan_request(item)

DynamoDbEncryption/runtimes/python/test/responses.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ def exhaustive_put_item_response(item):
1313
Get a put_item response in resource (ddb) format for any item.
1414
This is not intended to be a real response that DynamoDB would return,
1515
but the response should contain additional attributes that DynamoDB could return.
16-
This is only intended to exhaustively test the conversion of the request from client to resource format.
16+
This is only intended to exhaustively test the conversion of the request between client and resource formats.
1717
"""
1818
base = basic_put_item_response(item)
1919
additional_keys = {
@@ -38,7 +38,7 @@ def exhaustive_get_item_response(item):
3838
Get a get_item response in resource (ddb) format for any item.
3939
This is not intended to be a real response that DynamoDB would return,
4040
but the response should contain additional attributes that DynamoDB could return.
41-
This is only intended to exhaustively test the conversion of the request from client to resource format.
41+
This is only intended to exhaustively test the conversion of the request between client and resource formats.
4242
"""
4343
base = basic_get_item_response(item)
4444
additional_keys = {
@@ -62,7 +62,7 @@ def exhaustive_query_response(items):
6262
Get a query response in resource (ddb) format for any items.
6363
This is not intended to be a real response that DynamoDB would return,
6464
but the response should contain additional attributes that DynamoDB could return.
65-
This is only intended to exhaustively test the conversion of the request from client to resource format.
65+
This is only intended to exhaustively test the conversion of the request between client and resource formats.
6666
"""
6767
base = basic_query_response(items)
6868
additional_keys = {
@@ -83,7 +83,7 @@ def exhaustive_scan_response(items, keys):
8383
Get a scan response in resource (ddb) format for any items.
8484
This is not intended to be a real response that DynamoDB would return,
8585
but the response should contain additional attributes that DynamoDB could return.
86-
This is only intended to exhaustively test the conversion of the request from client to resource format.
86+
This is only intended to exhaustively test the conversion of the request between client and resource formats.
8787
"""
8888
base = basic_scan_response(items, keys)
8989
additional_keys = {
@@ -105,7 +105,7 @@ def exhaustive_batch_get_item_response(items):
105105
Get a batch_get_item response in resource (ddb) format for any items.
106106
This is not intended to be a real response that DynamoDB would return,
107107
but the response should contain additional attributes that DynamoDB could return.
108-
This is only intended to exhaustively test the conversion of the request from client to resource format.
108+
This is only intended to exhaustively test the conversion of the request between client and resource formats.
109109
"""
110110
base = basic_batch_get_item_response(items)
111111
additional_keys = {
@@ -130,7 +130,7 @@ def exhaustive_batch_write_item_put_response(items):
130130
Get a batch_write_item response in resource (ddb) format for any items.
131131
This is not intended to be a real response that DynamoDB would return,
132132
but the response should contain additional attributes that DynamoDB could return.
133-
This is only intended to exhaustively test the conversion of the request from client to resource format.
133+
This is only intended to exhaustively test the conversion of the request between client and resource formats.
134134
"""
135135
base = basic_batch_write_item_put_response(items)
136136
additional_keys = {

DynamoDbEncryption/runtimes/python/test/unit/internal/test_client_to_resource.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
# Copyright Amazon.com Inc. or its affiliates. All Rights Reserved.
22
# SPDX-License-Identifier: Apache-2.0
33
import pytest
4+
from boto3.dynamodb.conditions import ConditionExpressionBuilder
45

56
from aws_dbesdk_dynamodb.internal.client_to_resource import ClientShapeToResourceShapeConverter
6-
from boto3.dynamodb.conditions import ConditionExpressionBuilder
77

88
from ...items import (
99
complex_item_ddb,

DynamoDbEncryption/runtimes/python/tox.ini

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ deps =
9595
basepython = python3
9696
commands =
9797
{[testenv:blacken]commands}
98-
{[testenv:ruff]commands}
98+
{[testenv:ruff]commands} --fix
9999

100100
[testenv:lint-check]
101101
commands_pre =
@@ -105,4 +105,4 @@ deps =
105105
basepython = python3
106106
commands =
107107
{[testenv:black-check]commands}
108-
{[testenv:ruff]commands} --fix
108+
{[testenv:ruff]commands}

0 commit comments

Comments
 (0)