Docs: refer to client, not client2, in sample (#7441)

This commit is contained in:
Douglas Naphas 2024-03-08 15:49:38 -05:00 committed by GitHub
parent 4fc45e71df
commit 06bfd7f6db
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -26,11 +26,11 @@ Here is an example of what this looks like in practice:
os.environ["MOTO_ACCOUNT_ID"] = "111111111111" os.environ["MOTO_ACCOUNT_ID"] = "111111111111"
client.create_bucket(Bucket="bucket-in-account-2") client.create_bucket(Bucket="bucket-in-account-2")
assert [b["Name"] for b in client2.list_buckets()["Buckets"]] == ["bucket-in-account-2"] assert [b["Name"] for b in client.list_buckets()["Buckets"]] == ["bucket-in-account-2"]
# Now revert to the default account, by removing the environment variable # Now revert to the default account, by removing the environment variable
del os.environ["MOTO_ACCOUNT_ID"] del os.environ["MOTO_ACCOUNT_ID"]
assert [b["Name"] for b in client2.list_buckets()["Buckets"]] == ["bucket-default-account"] assert [b["Name"] for b in client.list_buckets()["Buckets"]] == ["bucket-default-account"]