Pytest model of exceptions uses 'value' attribute instead of 'exception'.
This commit is contained in:
parent
2705698d83
commit
6d364dc7aa
9 changed files with 74 additions and 81 deletions
|
|
@ -343,7 +343,7 @@ def test_put_scaling_policy():
|
|||
PolicyType="ABCDEFG",
|
||||
TargetTrackingScalingPolicyConfiguration=policy_body,
|
||||
)
|
||||
e.exception.response["Error"]["Message"].should.match(
|
||||
e.value.response["Error"]["Message"].should.match(
|
||||
r"Unknown policy type .* specified."
|
||||
)
|
||||
|
||||
|
|
@ -450,7 +450,7 @@ def test_delete_scaling_policies():
|
|||
ResourceId=resource_id,
|
||||
ScalableDimension=scalable_dimension,
|
||||
)
|
||||
e.exception.response["Error"]["Message"].should.match(r"No scaling policy found .*")
|
||||
e.value.response["Error"]["Message"].should.match(r"No scaling policy found .*")
|
||||
|
||||
response = client.put_scaling_policy(
|
||||
PolicyName=policy_name,
|
||||
|
|
@ -513,6 +513,6 @@ def test_deregister_scalable_target():
|
|||
ResourceId=resource_id,
|
||||
ScalableDimension=scalable_dimension,
|
||||
)
|
||||
e.exception.response["Error"]["Message"].should.match(
|
||||
e.value.response["Error"]["Message"].should.match(
|
||||
r"No scalable target found .*"
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue