From d89e4d236ceaa5eda2c915096c0ae5d989f4b1b2 Mon Sep 17 00:00:00 2001 From: Sean Coonce Date: Fri, 30 Dec 2022 06:21:25 -0800 Subject: [PATCH] docs: fix patching external client/resource docs (#5804) --- docs/docs/getting_started.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/docs/getting_started.rst b/docs/docs/getting_started.rst index 2da49847f..c4daf958f 100644 --- a/docs/docs/getting_started.rst +++ b/docs/docs/getting_started.rst @@ -288,7 +288,7 @@ If it is not possible to rearrange imports, we can patch the boto3-client or res .. sourcecode:: python # The client can come from an import, an __init__-file, wherever.. - client = boto3.client("s3") + outside_client = boto3.client("s3") s3 = boto3.resource("s3") @mock_s3 @@ -297,7 +297,7 @@ If it is not possible to rearrange imports, we can patch the boto3-client or res patch_client(outside_client) patch_resource(s3) - assert client.list_buckets()["Buckets"] == [] + assert outside_client.list_buckets()["Buckets"] == [] assert list(s3.buckets.all()) == []