Skip to content

Commit 5920535

Browse files
committed
fix(e2e): fix e2e tests running on python 3.7
1 parent 7c9952c commit 5920535

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

tests/e2e/streaming/handlers/s3_object_handler.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,13 +66,15 @@ def lambda_handler(event, context):
6666

6767
if transform_zip or transform_zip_lzma:
6868
response["manifest"] = obj.namelist()
69-
response["body"] = obj.read(obj.namelist()[1]).rstrip() # extracts the second file on the zip
69+
response["body"] = (
70+
obj.read(obj.namelist()[1]).rstrip().decode("utf-8")
71+
) # extracts the second file on the zip
7072
elif transform_csv or csv:
7173
response["body"] = obj.__next__()
7274
elif transform_gzip or gunzip:
73-
response["body"] = obj.readline().rstrip()
75+
response["body"] = obj.readline().rstrip().decode("utf-8")
7476
else:
75-
response["body"] = obj.readline().rstrip()
77+
response["body"] = obj.readline().rstrip().decode("utf-8")
7678
except botocore.exceptions.ClientError as e:
7779
if e.response["Error"]["Code"] == "404":
7880
response["error"] = "Not found"

0 commit comments

Comments
 (0)