File tree Expand file tree Collapse file tree 2 files changed +6
-7
lines changed
TestVectors/runtimes/python/src/aws_dbesdk_dynamodb_test_vectors Expand file tree Collapse file tree 2 files changed +6
-7
lines changed Original file line number Diff line number Diff line change 5
5
from aws_dbesdk_dynamodb .encrypted .client import EncryptedClient
6
6
from smithy_dafny_standard_library .internaldafny .generated import Wrappers
7
7
from aws_dbesdk_dynamodb .smithygenerated .aws_cryptography_dbencryptionsdk_dynamodb .errors import _smithy_error_to_dafny_error
8
- from aws_dbesdk_dynamodb_test_vectors .waiting_boto3_ddb_client import WaitingDynamoClient
8
+ from aws_dbesdk_dynamodb_test_vectors .waiting_boto3_ddb_client import WaitingLocalDynamoClient
9
9
10
10
class default__ :
11
11
@staticmethod
12
12
def CreateVanillaDDBClient ():
13
13
try :
14
- return aws_cryptography_internal_dynamodb .internaldafny .extern .Com_Amazonaws_Dynamodb .default__ .DynamoDBClient (WaitingDynamoClient ())
14
+ return aws_cryptography_internal_dynamodb .internaldafny .extern .Com_Amazonaws_Dynamodb .default__ .DynamoDBClient (WaitingLocalDynamoClient ())
15
15
except Exception as e :
16
16
return Wrappers .Result_Failure (_smithy_error_to_dafny_error (e ))
17
17
18
18
@staticmethod
19
19
def CreateInterceptedDDBClient (dafny_encryption_config ):
20
20
try :
21
21
native_encryption_config = aws_cryptography_dbencryptionsdk_dynamodb_DynamoDbTablesEncryptionConfig (dafny_encryption_config )
22
- boto3_client = WaitingDynamoClient ()
22
+ boto3_client = WaitingLocalDynamoClient ()
23
23
encrypted_client = EncryptedClient (client = boto3_client , encryption_config = native_encryption_config )
24
24
return aws_cryptography_internal_dynamodb .internaldafny .extern .Com_Amazonaws_Dynamodb .default__ .DynamoDBClient (encrypted_client )
25
25
except Exception as e :
Original file line number Diff line number Diff line change 3
3
class WaitingLocalDynamoClient :
4
4
"""
5
5
boto3 DynamoDB client wrapper that wraps `create_table` and `delete_table` methods
6
- and connects to localhost:8000.
7
- If these methods are called on this client, they will block returning until
6
+ and connects to localhost:8000.
7
+ If overridden methods are called on this client, they will block returning until
8
8
the table is created/deleted.
9
9
This is the expected behavior of SDK clients in our Dafny code.
10
10
All other methods besides these are unchanged and will call the boto3 client directly.
@@ -14,7 +14,6 @@ def __init__(self):
14
14
15
15
def __getattr__ (self , name ):
16
16
if hasattr (self ._client , name ):
17
- print (f'calling underlyign client { name = } ' )
18
17
original_method = getattr (self ._client , name )
19
18
20
19
if name == 'create_table' :
@@ -46,4 +45,4 @@ def wrapper(*args, **kwargs):
46
45
waiter .wait (TableName = table_name )
47
46
print (f"Table '{ table_name } ' has been deleted." )
48
47
return response
49
- return wrapper
48
+ return wrapper
You can’t perform that action at this time.
0 commit comments