AWS X-Ray client mock. (#1255)

* X-Ray Client SDK patched

Fixes #1250

* Fixed flake8

* Fixed some issues

* Fixed flake8

* Fixed more typos

* Fixed python2 string

* Fixed aws-sdk patch order

* Added more test cases to test the patching
This commit is contained in:
Terry Cain 2017-10-17 01:06:22 +01:00 committed by Jack Danger
commit 49ddb500a8
11 changed files with 273 additions and 8 deletions

View file

@ -9,6 +9,7 @@ try:
except:
from urllib.parse import unquote, urlparse, parse_qs
from moto.core.utils import amz_crc32, amzn_request_id
from moto.core.responses import BaseResponse
@ -32,6 +33,8 @@ class LambdaResponse(BaseResponse):
else:
raise ValueError("Cannot handle request")
@amz_crc32
@amzn_request_id
def invoke(self, request, full_url, headers):
self.setup_class(request, full_url, headers)
if request.method == 'POST':
@ -39,6 +42,8 @@ class LambdaResponse(BaseResponse):
else:
raise ValueError("Cannot handle request")
@amz_crc32
@amzn_request_id
def invoke_async(self, request, full_url, headers):
self.setup_class(request, full_url, headers)
if request.method == 'POST':