diff --git a/docs/docs/contributing/development_tips/tests.rst b/docs/docs/contributing/development_tips/tests.rst index 1168a4d85..b41488821 100644 --- a/docs/docs/contributing/development_tips/tests.rst +++ b/docs/docs/contributing/development_tips/tests.rst @@ -17,9 +17,9 @@ When writing negative tests, try to use the following format: with pytest.raises(botocore.exceptions.ClientError) as exc: client.failing_call(..) err = exc.value.response["Error"] - # These assertions use the 'sure' library, but any assertion style is accepted - err["Code"].should.equal(..) - err["Message"].should.equal(..) + # Use the pytest assert method, see https://docs.pytest.org/en/stable/how-to/assert.html# + assert err["Code"] == .. + assert err["Message"] == .. This is the best way to ensure that exceptions are dealt with correctly by Moto.