Created
September 13, 2022 01:42
-
-
Save gsweene2/d4dcecb9ddf247f736ef57c1c14fc479 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def test_get_bucket_contents_and_get_table_details_from_clients__when_real_bucket_exists_and_table_exists__should_return_correctly(): | |
# Arrange | |
s3_util = S3Util(boto3.client('s3')) | |
dynamo_util = DynamoUtil(boto3.client('dynamodb')) | |
# Act | |
r = main.get_bucket_contents_and_get_table_details_from_clients(s3_util, dynamo_util) | |
# Assert - S3 | |
valid_objects = ['object1.txt', 'object2.txt', 'object3.txt'] | |
actual_objects = [i['Key'] for i in r[0]] | |
assert valid_objects == actual_objects | |
# Assert - Dymamo | |
assert "garretts-sample-table" == r[1]['TableName'] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment