Techdebt: Sure - Documentation (#6051)
This commit is contained in:
parent
1934d24ad5
commit
bb60ea3594
@ -17,9 +17,9 @@ When writing negative tests, try to use the following format:
|
|||||||
with pytest.raises(botocore.exceptions.ClientError) as exc:
|
with pytest.raises(botocore.exceptions.ClientError) as exc:
|
||||||
client.failing_call(..)
|
client.failing_call(..)
|
||||||
err = exc.value.response["Error"]
|
err = exc.value.response["Error"]
|
||||||
# These assertions use the 'sure' library, but any assertion style is accepted
|
# Use the pytest assert method, see https://docs.pytest.org/en/stable/how-to/assert.html#
|
||||||
err["Code"].should.equal(..)
|
assert err["Code"] == ..
|
||||||
err["Message"].should.equal(..)
|
assert err["Message"] == ..
|
||||||
|
|
||||||
This is the best way to ensure that exceptions are dealt with correctly by Moto.
|
This is the best way to ensure that exceptions are dealt with correctly by Moto.
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user