[lambda] Fix HTTP code of CreateFunction
This commit is contained in:
parent
5a29ec4986
commit
5f7ea2b77f
@ -41,7 +41,7 @@ class LambdaResponse(BaseResponse):
|
|||||||
spec = json.loads(request.body)
|
spec = json.loads(request.body)
|
||||||
fn = lambda_backend.create_function(spec)
|
fn = lambda_backend.create_function(spec)
|
||||||
config = fn.get_configuration()
|
config = fn.get_configuration()
|
||||||
return 200, headers, json.dumps(config)
|
return 201, headers, json.dumps(config)
|
||||||
|
|
||||||
def _delete_function(self, request, full_url, headers):
|
def _delete_function(self, request, full_url, headers):
|
||||||
lambda_backend = self.get_lambda_backend(full_url)
|
lambda_backend = self.get_lambda_backend(full_url)
|
||||||
|
@ -64,7 +64,7 @@ def test_create_function_from_aws_bucket():
|
|||||||
# "VpcId": "vpc-123abc"
|
# "VpcId": "vpc-123abc"
|
||||||
# },
|
# },
|
||||||
|
|
||||||
'ResponseMetadata': {'HTTPStatusCode': 200},
|
'ResponseMetadata': {'HTTPStatusCode': 201},
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
@ -120,7 +120,7 @@ def handler(event, context):
|
|||||||
# "VpcId": "vpc-123abc"
|
# "VpcId": "vpc-123abc"
|
||||||
# },
|
# },
|
||||||
|
|
||||||
'ResponseMetadata': {'HTTPStatusCode': 200},
|
'ResponseMetadata': {'HTTPStatusCode': 201},
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user