From 101dfaa4129bd7d22fead5e0a72b2b35a423cf52 Mon Sep 17 00:00:00 2001 From: Chris Keogh Date: Fri, 15 Sep 2017 15:07:02 +1200 Subject: [PATCH] fix tests for python 3.x --- moto/awslambda/models.py | 2 +- tests/test_awslambda/test_lambda.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/moto/awslambda/models.py b/moto/awslambda/models.py index b34e3e9d4..1c489f3fd 100644 --- a/moto/awslambda/models.py +++ b/moto/awslambda/models.py @@ -111,7 +111,7 @@ class LambdaFunction(BaseModel): } def get_code(self): - if 'S3Key' in self.code: + if isinstance(self.code, dict): return { "Code": { "Location": "s3://lambda-functions.aws.amazon.com/{0}".format(self.code['S3Key']), diff --git a/tests/test_awslambda/test_lambda.py b/tests/test_awslambda/test_lambda.py index b1de685b8..8a5d84f33 100644 --- a/tests/test_awslambda/test_lambda.py +++ b/tests/test_awslambda/test_lambda.py @@ -624,4 +624,4 @@ def test_get_function_created_with_zipfile(): "SubnetIds": [], } }, - ) \ No newline at end of file + )