API Gateway - Linting
This commit is contained in:
parent
f0e2d44c5d
commit
e4b586022d
@ -8,6 +8,7 @@ import requests
|
|||||||
import time
|
import time
|
||||||
|
|
||||||
from boto3.session import Session
|
from boto3.session import Session
|
||||||
|
|
||||||
try:
|
try:
|
||||||
from urlparse import urlparse
|
from urlparse import urlparse
|
||||||
except ImportError:
|
except ImportError:
|
||||||
@ -731,7 +732,8 @@ class APIGatewayBackend(BaseBackend):
|
|||||||
stage_variables = {}
|
stage_variables = {}
|
||||||
api = self.get_rest_api(function_id)
|
api = self.get_rest_api(function_id)
|
||||||
methods = [
|
methods = [
|
||||||
list(res.resource_methods.values()) for res in self.list_resources(function_id)
|
list(res.resource_methods.values())
|
||||||
|
for res in self.list_resources(function_id)
|
||||||
][0]
|
][0]
|
||||||
if not any(methods):
|
if not any(methods):
|
||||||
raise NoMethodDefined()
|
raise NoMethodDefined()
|
||||||
|
@ -1026,7 +1026,9 @@ def test_delete_stage():
|
|||||||
response["ResponseMetadata"]["HTTPStatusCode"].should.equal(202)
|
response["ResponseMetadata"]["HTTPStatusCode"].should.equal(202)
|
||||||
# verify other stage still exists
|
# verify other stage still exists
|
||||||
stages = client.get_stages(restApiId=api_id)["item"]
|
stages = client.get_stages(restApiId=api_id)["item"]
|
||||||
sorted([stage["stageName"] for stage in stages]).should.equal(sorted([new_stage_name, stage_name]))
|
sorted([stage["stageName"] for stage in stages]).should.equal(
|
||||||
|
sorted([new_stage_name, stage_name])
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
@mock_apigateway
|
@mock_apigateway
|
||||||
|
Loading…
Reference in New Issue
Block a user