File tree Expand file tree Collapse file tree 3 files changed +35
-21
lines changed
TestVectors/runtimes/python
src/dbesdk_ddb_test_vectors/internaldafny/extern Expand file tree Collapse file tree 3 files changed +35
-21
lines changed Original file line number Diff line number Diff line change @@ -200,25 +200,6 @@ def get_item(self, **kwargs):
200
200
client_output = self ._table_shape_to_client_shape_converter .get_item_response (table_output )
201
201
return client_output
202
202
203
- def _convert_batch_write_item_request_from_dynamo_to_dict (self , ** kwargs ):
204
- for table , requests in kwargs ["RequestItems" ].items ():
205
- dict_requests = []
206
- for request in requests :
207
- request_name_list = list (request .keys ())
208
- if len (request_name_list ) > 1 :
209
- raise ValueError ("Cannot send more than one request in a single request" )
210
- request_name = request_name_list [0 ]
211
- if request_name == "PutRequest" :
212
- dict_request = ddb_to_dict (request [request_name ]["Item" ])
213
- dict_requests .append ({request_name : {"Item" : dict_request }})
214
- elif request_name == "DeleteRequest" :
215
- dict_request = ddb_to_dict (request [request_name ]["Key" ])
216
- dict_requests .append ({request_name : {"Key" : dict_request }})
217
- else :
218
- raise ValueError (f"Unknown batch_write_items method key: { request_name } " )
219
- kwargs ["RequestItems" ][table ] = dict_requests
220
- return kwargs
221
-
222
203
def batch_write_item (self , ** kwargs ):
223
204
# print(f"batch_write_item {kwargs=}")
224
205
# Parse boto3 client.batch_write_item input into table.batch_writer() calls
Original file line number Diff line number Diff line change 19
19
import dbesdk_ddb_test_vectors .internaldafny .extern .CreateInterceptedDDBResource
20
20
import dbesdk_ddb_test_vectors .internaldafny .extern .CreateWrappedDictItemEncryptor
21
21
22
+ # Remove invalid tests.
23
+ # Supported operations on `resource` that are also supported by DBESDK are:
24
+ # - batch_get_item
25
+ # - batch_write_item
26
+ # Unsupported operations on `resource` are that are supported by DBESDK are:
27
+ # - put_item
28
+ # - get_item
29
+ # - query
30
+ # - scan
31
+ # - transact_get_items
32
+ # - transact_write_items
33
+ # Remove any tests that call unsupported operations.
34
+ # If more tests that call these operations are added, remove them below.
35
+ # If the list below becomes unmaintainable,
36
+ # or if other languages add clients with unsupported operations,
37
+ # refactor the Dafny code to conditionally call tests
38
+ # based on whether the client supports the operation under test.
39
+
40
+ def EmptyTest (* args ):
41
+ pass
42
+
43
+ dbesdk_ddb_test_vectors .internaldafny .generated .DdbEncryptionTestVectors .TestVectorConfig .BasicIoTestPutItem = EmptyTest
44
+ dbesdk_ddb_test_vectors .internaldafny .generated .DdbEncryptionTestVectors .TestVectorConfig .BasicIoTestTransactWriteItems = EmptyTest
45
+ dbesdk_ddb_test_vectors .internaldafny .generated .DdbEncryptionTestVectors .TestVectorConfig .BasicQueryTest = EmptyTest
46
+ dbesdk_ddb_test_vectors .internaldafny .generated .DdbEncryptionTestVectors .TestVectorConfig .BasicIoTestGetItem = EmptyTest
47
+ dbesdk_ddb_test_vectors .internaldafny .generated .DdbEncryptionTestVectors .TestVectorConfig .BasicIoTestScan = EmptyTest
48
+ dbesdk_ddb_test_vectors .internaldafny .generated .DdbEncryptionTestVectors .TestVectorConfig .BasicIoTestTransactGetItems = EmptyTest
49
+
22
50
def test_dafny ():
23
51
from ..internaldafny .generated import __main__
Original file line number Diff line number Diff line change 20
20
import dbesdk_ddb_test_vectors .internaldafny .extern .CreateWrappedDictItemEncryptor
21
21
22
22
# Remove invalid tests.
23
- # Unsupported operations on `table` are:
23
+ # Supported operations on `table` that are also supported by DBESDK are:
24
+ # - put_item
25
+ # - get_item
26
+ # - query
27
+ # - scan
28
+ # Unsupported operations on `table` are that are supported by DBESDK are:
24
29
# - transact_get_items
25
30
# - transact_write_items
26
31
# - batch_get_item
27
- # Remove any tests that call these operations.
32
+ # Remove any tests that call unsupported operations.
28
33
# If more tests that call these operations are added, remove them below.
29
34
# If the list below becomes unmaintainable,
30
35
# or if other languages add clients with unsupported operations,
You can’t perform that action at this time.
0 commit comments