API Gateway - Linting
This commit is contained in:
parent
f0e2d44c5d
commit
e4b586022d
@ -8,6 +8,7 @@ import requests
|
||||
import time
|
||||
|
||||
from boto3.session import Session
|
||||
|
||||
try:
|
||||
from urlparse import urlparse
|
||||
except ImportError:
|
||||
@ -731,7 +732,8 @@ class APIGatewayBackend(BaseBackend):
|
||||
stage_variables = {}
|
||||
api = self.get_rest_api(function_id)
|
||||
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]
|
||||
if not any(methods):
|
||||
raise NoMethodDefined()
|
||||
|
@ -1026,7 +1026,9 @@ def test_delete_stage():
|
||||
response["ResponseMetadata"]["HTTPStatusCode"].should.equal(202)
|
||||
# verify other stage still exists
|
||||
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
|
||||
|
Loading…
Reference in New Issue
Block a user