From bb60ea3594681b6683f2611003a8b47f3fbcf99f Mon Sep 17 00:00:00 2001 From: Hans Donner Date: Sat, 11 Mar 2023 16:37:02 +0100 Subject: [PATCH] Techdebt: Sure - Documentation (#6051) --- docs/docs/contributing/development_tips/tests.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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.