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

@ -414,7 +414,8 @@ def test_get_authorization_token_assume_region():
client = boto3.client('ecr', region_name='us-east-1')
auth_token_response = client.get_authorization_token()
list(auth_token_response.keys()).should.equal(['authorizationData', 'ResponseMetadata'])
auth_token_response.should.contain('authorizationData')
auth_token_response.should.contain('ResponseMetadata')
auth_token_response['authorizationData'].should.equal([
{
'authorizationToken': 'QVdTOnVzLWVhc3QtMS1hdXRoLXRva2Vu',
@ -429,7 +430,8 @@ def test_get_authorization_token_explicit_regions():
client = boto3.client('ecr', region_name='us-east-1')
auth_token_response = client.get_authorization_token(registryIds=['us-east-1', 'us-west-1'])
list(auth_token_response.keys()).should.equal(['authorizationData', 'ResponseMetadata'])
auth_token_response.should.contain('authorizationData')
auth_token_response.should.contain('ResponseMetadata')
auth_token_response['authorizationData'].should.equal([
{
'authorizationToken': 'QVdTOnVzLWVhc3QtMS1hdXRoLXRva2Vu',