-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #30 from mathom/config
Rework the boto session and config handling
- Loading branch information
Showing
14 changed files
with
225 additions
and
100 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
coveralls==1.1 | ||
mock==1.3.0 | ||
nose==1.3.7 | ||
placebo==0.7.2 |
22 changes: 22 additions & 0 deletions
22
tests/placebo/TestZappa.test_create_api_gateway_routes/apigateway.CreateRestApi_1.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
{ | ||
"status_code": 201, | ||
"data": { | ||
"id": "j27idab94h", | ||
"name": "123", | ||
"description": "123 Zappa", | ||
"ResponseMetadata": { | ||
"HTTPStatusCode": 201, | ||
"RequestId": "ded1717d-dc3a-11e5-afc9-35deb4d0a175" | ||
}, | ||
"createdDate": { | ||
"hour": 21, | ||
"__class__": "datetime", | ||
"month": 2, | ||
"second": 50, | ||
"microsecond": 0, | ||
"year": 2016, | ||
"day": 25, | ||
"minute": 41 | ||
} | ||
} | ||
} |
15 changes: 15 additions & 0 deletions
15
tests/placebo/TestZappa.test_create_api_gateway_routes/apigateway.GetResources_1.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
{ | ||
"status_code": 200, | ||
"data": { | ||
"items": [ | ||
{ | ||
"path": "/", | ||
"id": "g1atjiylwd" | ||
} | ||
], | ||
"ResponseMetadata": { | ||
"HTTPStatusCode": 200, | ||
"RequestId": "dee74371-dc3a-11e5-adc8-c7e9cc4e6647" | ||
} | ||
} | ||
} |
13 changes: 13 additions & 0 deletions
13
tests/placebo/TestZappa.test_create_api_gateway_routes/apigateway.GetRestApi_1.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
{ | ||
"status_code": 404, | ||
"data": { | ||
"ResponseMetadata": { | ||
"HTTPStatusCode": 404, | ||
"RequestId": "dec9f7a4-dc3a-11e5-ae49-899567c90292" | ||
}, | ||
"Error": { | ||
"Message": "Invalid REST API identifier specified", | ||
"Code": "NotFoundException" | ||
} | ||
} | ||
} |
21 changes: 21 additions & 0 deletions
21
...placebo/TestZappa.test_create_api_gateway_routes/apigateway.PutIntegrationResponse_1.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
{ | ||
"status_code": 201, | ||
"data": { | ||
"statusCode": "200", | ||
"responseTemplates": { | ||
"text/html": "#set($inputRoot = $input.path('$'))\n$inputRoot.Content" | ||
}, | ||
"selectionPattern": "", | ||
"ResponseMetadata": { | ||
"HTTPStatusCode": 201, | ||
"RequestId": "df27f5f3-dc3a-11e5-adc8-c7e9cc4e6647" | ||
}, | ||
"responseParameters": { | ||
"method.response.header.Content-Type": "integration.response.body.Content-Type", | ||
"method.response.header.Location": "integration.response.body.Location", | ||
"method.response.header.X-Frame-Options": "integration.response.body.X-Frame-Options", | ||
"method.response.header.Status": "integration.response.body.Status", | ||
"method.response.header.Set-Cookie": "integration.response.body.Set-Cookie" | ||
} | ||
} | ||
} |
20 changes: 20 additions & 0 deletions
20
tests/placebo/TestZappa.test_create_api_gateway_routes/apigateway.PutIntegration_1.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
{ | ||
"status_code": 201, | ||
"data": { | ||
"cacheKeyParameters": [], | ||
"ResponseMetadata": { | ||
"HTTPStatusCode": 201, | ||
"RequestId": "df135c7e-dc3a-11e5-afc9-35deb4d0a175" | ||
}, | ||
"uri": "arn:aws:apigateway:us-east-1:lambda:path/2015-03-31/functions/arn:aws:lambda:us-east-1:12345:function:helloworld/invocations", | ||
"httpMethod": "POST", | ||
"requestTemplates": { | ||
"application/json": "{\n \"body\" : $input.json('$'),\n \"headers\": {\n #foreach($header in $input.params().header.keySet())\n \"$header\": \"$util.escapeJavaScript($input.params().header.get($header))\" #if($foreach.hasNext),#end\n \n #end\n },\n \"method\": \"$context.httpMethod\",\n \"params\": {\n #foreach($param in $input.params().path.keySet())\n \"$param\": \"$util.escapeJavaScript($input.params().path.get($param))\" #if($foreach.hasNext),#end\n \n #end\n },\n \"query\": {\n #foreach($queryParam in $input.params().querystring.keySet())\n \"$queryParam\": \"$util.escapeJavaScript($input.params().querystring.get($queryParam))\" #if($foreach.hasNext),#end\n \n #end\n } \n}", | ||
"application/x-www-form-urlencoded": "#set($rawPostData = $input.path('$'))\n{\n \"body\" : \"$rawPostData\",\n \"headers\": {\n #foreach($header in $input.params().header.keySet())\n \"$header\": \"$util.escapeJavaScript($input.params().header.get($header))\" #if($foreach.hasNext),#end\n \n #end\n },\n \"method\": \"$context.httpMethod\",\n \"params\": {\n #foreach($param in $input.params().path.keySet())\n \"$param\": \"$util.escapeJavaScript($input.params().path.get($param))\" #if($foreach.hasNext),#end\n \n #end\n },\n \"query\": {\n #foreach($queryParam in $input.params().querystring.keySet())\n \"$queryParam\": \"$util.escapeJavaScript($input.params().querystring.get($queryParam))\" #if($foreach.hasNext),#end\n \n #end\n } \n}" | ||
}, | ||
"cacheNamespace": "none", | ||
"credentials": "arn:aws:iam::12345:role/ZappaLambdaExecution", | ||
"type": "AWS", | ||
"requestParameters": {} | ||
} | ||
} |
20 changes: 20 additions & 0 deletions
20
tests/placebo/TestZappa.test_create_api_gateway_routes/apigateway.PutMethodResponse_1.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
{ | ||
"status_code": 201, | ||
"data": { | ||
"responseModels": { | ||
"text/html": "Empty" | ||
}, | ||
"statusCode": "200", | ||
"ResponseMetadata": { | ||
"HTTPStatusCode": 201, | ||
"RequestId": "df1e3225-dc3a-11e5-ae49-899567c90292" | ||
}, | ||
"responseParameters": { | ||
"method.response.header.Content-Type": false, | ||
"method.response.header.Location": false, | ||
"method.response.header.X-Frame-Options": false, | ||
"method.response.header.Status": false, | ||
"method.response.header.Set-Cookie": false | ||
} | ||
} | ||
} |
12 changes: 12 additions & 0 deletions
12
tests/placebo/TestZappa.test_create_api_gateway_routes/apigateway.PutMethod_1.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
{ | ||
"status_code": 201, | ||
"data": { | ||
"apiKeyRequired": false, | ||
"httpMethod": "GET", | ||
"authorizationType": "NONE", | ||
"ResponseMetadata": { | ||
"HTTPStatusCode": 201, | ||
"RequestId": "df048f72-dc3a-11e5-adc8-c7e9cc4e6647" | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.