Remove HTTPHeaders from ResponseMetadata in some tests
botocore 1.4.29 started adding this. I'd match against it, but it contains a date object and it's just not worth rewriting the assertions for a key-by-key approach.
This commit is contained in:
parent
a9e54482fc
commit
aab137ae66
3 changed files with 21 additions and 1 deletions
|
|
@ -76,6 +76,7 @@ def test_create_resource():
|
|||
restApiId=api_id,
|
||||
resourceId=root_id,
|
||||
)
|
||||
root_resource['ResponseMetadata'].pop('HTTPHeaders') # this is hard to match against, so remove it
|
||||
root_resource.should.equal({
|
||||
'path': '/',
|
||||
'id': root_id,
|
||||
|
|
@ -133,6 +134,7 @@ def test_child_resource():
|
|||
restApiId=api_id,
|
||||
resourceId=tags_id,
|
||||
)
|
||||
child_resource['ResponseMetadata'].pop('HTTPHeaders') # this is hard to match against, so remove it
|
||||
child_resource.should.equal({
|
||||
'path': '/users/tags',
|
||||
'pathPart': 'tags',
|
||||
|
|
@ -168,6 +170,7 @@ def test_create_method():
|
|||
httpMethod='GET'
|
||||
)
|
||||
|
||||
response['ResponseMetadata'].pop('HTTPHeaders') # this is hard to match against, so remove it
|
||||
response.should.equal({
|
||||
'httpMethod': 'GET',
|
||||
'authorizationType': 'none',
|
||||
|
|
@ -206,6 +209,7 @@ def test_create_method_response():
|
|||
httpMethod='GET',
|
||||
statusCode='200',
|
||||
)
|
||||
response['ResponseMetadata'].pop('HTTPHeaders') # this is hard to match against, so remove it
|
||||
response.should.equal({
|
||||
'ResponseMetadata': {'HTTPStatusCode': 200},
|
||||
'statusCode': '200'
|
||||
|
|
@ -217,6 +221,7 @@ def test_create_method_response():
|
|||
httpMethod='GET',
|
||||
statusCode='200',
|
||||
)
|
||||
response['ResponseMetadata'].pop('HTTPHeaders') # this is hard to match against, so remove it
|
||||
response.should.equal({
|
||||
'ResponseMetadata': {'HTTPStatusCode': 200},
|
||||
'statusCode': '200'
|
||||
|
|
@ -228,6 +233,7 @@ def test_create_method_response():
|
|||
httpMethod='GET',
|
||||
statusCode='200',
|
||||
)
|
||||
response['ResponseMetadata'].pop('HTTPHeaders') # this is hard to match against, so remove it
|
||||
response.should.equal({'ResponseMetadata': {'HTTPStatusCode': 200}})
|
||||
|
||||
|
||||
|
|
@ -264,6 +270,7 @@ def test_integrations():
|
|||
type='HTTP',
|
||||
uri='http://httpbin.org/robots.txt',
|
||||
)
|
||||
response['ResponseMetadata'].pop('HTTPHeaders') # this is hard to match against, so remove it
|
||||
response.should.equal({
|
||||
'ResponseMetadata': {'HTTPStatusCode': 200},
|
||||
'httpMethod': 'GET',
|
||||
|
|
@ -284,6 +291,7 @@ def test_integrations():
|
|||
resourceId=root_id,
|
||||
httpMethod='GET'
|
||||
)
|
||||
response['ResponseMetadata'].pop('HTTPHeaders') # this is hard to match against, so remove it
|
||||
response.should.equal({
|
||||
'ResponseMetadata': {'HTTPStatusCode': 200},
|
||||
'httpMethod': 'GET',
|
||||
|
|
@ -303,6 +311,7 @@ def test_integrations():
|
|||
restApiId=api_id,
|
||||
resourceId=root_id,
|
||||
)
|
||||
response['ResponseMetadata'].pop('HTTPHeaders') # this is hard to match against, so remove it
|
||||
response['resourceMethods']['GET']['methodIntegration'].should.equal({
|
||||
'httpMethod': 'GET',
|
||||
'integrationResponses': {
|
||||
|
|
@ -371,6 +380,7 @@ def test_integration_response():
|
|||
statusCode='200',
|
||||
selectionPattern='foobar',
|
||||
)
|
||||
response['ResponseMetadata'].pop('HTTPHeaders') # this is hard to match against, so remove it
|
||||
response.should.equal({
|
||||
'statusCode': '200',
|
||||
'selectionPattern': 'foobar',
|
||||
|
|
@ -386,6 +396,7 @@ def test_integration_response():
|
|||
httpMethod='GET',
|
||||
statusCode='200',
|
||||
)
|
||||
response['ResponseMetadata'].pop('HTTPHeaders') # this is hard to match against, so remove it
|
||||
response.should.equal({
|
||||
'statusCode': '200',
|
||||
'selectionPattern': 'foobar',
|
||||
|
|
@ -400,6 +411,7 @@ def test_integration_response():
|
|||
resourceId=root_id,
|
||||
httpMethod='GET',
|
||||
)
|
||||
response['ResponseMetadata'].pop('HTTPHeaders') # this is hard to match against, so remove it
|
||||
response['methodIntegration']['integrationResponses'].should.equal({
|
||||
'200': {
|
||||
'responseTemplates': {
|
||||
|
|
@ -444,6 +456,7 @@ def test_deployment():
|
|||
restApiId=api_id,
|
||||
deploymentId=deployment_id,
|
||||
)
|
||||
response['ResponseMetadata'].pop('HTTPHeaders') # this is hard to match against, so remove it
|
||||
response.should.equal({
|
||||
'id': deployment_id,
|
||||
'ResponseMetadata': {'HTTPStatusCode': 200}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue