Skip to content

Commit

Permalink
docs: fix patching external client/resource docs (#5804)
Browse files Browse the repository at this point in the history
  • Loading branch information
cooncesean authored Dec 30, 2022
1 parent 555928a commit d89e4d2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/docs/getting_started.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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()) == []

Expand Down

0 comments on commit d89e4d2

Please sign in to comment.