[lambda] Fix HTTP code of CreateFunction

This commit is contained in:
Hugo Lopes Tavares 2016-02-16 15:24:41 -05:00
parent 5a29ec4986
commit 5f7ea2b77f
2 changed files with 3 additions and 3 deletions

View File

@ -41,7 +41,7 @@ class LambdaResponse(BaseResponse):
spec = json.loads(request.body)
fn = lambda_backend.create_function(spec)
config = fn.get_configuration()
return 200, headers, json.dumps(config)
return 201, headers, json.dumps(config)
def _delete_function(self, request, full_url, headers):
lambda_backend = self.get_lambda_backend(full_url)

View File

@ -64,7 +64,7 @@ def test_create_function_from_aws_bucket():
# "VpcId": "vpc-123abc"
# },
'ResponseMetadata': {'HTTPStatusCode': 200},
'ResponseMetadata': {'HTTPStatusCode': 201},
})
@ -120,7 +120,7 @@ def handler(event, context):
# "VpcId": "vpc-123abc"
# },
'ResponseMetadata': {'HTTPStatusCode': 200},
'ResponseMetadata': {'HTTPStatusCode': 201},
})