diff --git a/tests/e2e/idempotency/test_idempotency_dynamodb.py b/tests/e2e/idempotency/test_idempotency_dynamodb.py index 06147227549..31382ff9050 100644 --- a/tests/e2e/idempotency/test_idempotency_dynamodb.py +++ b/tests/e2e/idempotency/test_idempotency_dynamodb.py @@ -130,4 +130,5 @@ def test_idempotent_function_thread_safety(function_thread_safety_handler_fn_arn assert function_thread["exception"] is None assert function_thread["output"] is not None - assert first_execution_response == second_execution_response + # we use set() here because we want to compare the elements regardless of their order in the array + assert set(first_execution_response) == set(second_execution_response) diff --git a/tests/e2e/streaming/handlers/s3_object_handler.py b/tests/e2e/streaming/handlers/s3_object_handler.py index 98bda22c2bb..3c47f4ab3b7 100644 --- a/tests/e2e/streaming/handlers/s3_object_handler.py +++ b/tests/e2e/streaming/handlers/s3_object_handler.py @@ -66,13 +66,15 @@ def lambda_handler(event, context): if transform_zip or transform_zip_lzma: response["manifest"] = obj.namelist() - response["body"] = obj.read(obj.namelist()[1]).rstrip() # extracts the second file on the zip + response["body"] = ( + obj.read(obj.namelist()[1]).rstrip().decode("utf-8") + ) # extracts the second file on the zip elif transform_csv or csv: response["body"] = obj.__next__() elif transform_gzip or gunzip: - response["body"] = obj.readline().rstrip() + response["body"] = obj.readline().rstrip().decode("utf-8") else: - response["body"] = obj.readline().rstrip() + response["body"] = obj.readline().rstrip().decode("utf-8") except botocore.exceptions.ClientError as e: if e.response["Error"]["Code"] == "404": response["error"] = "Not found"