From f805717231598a7f63832232d7c383f8c519326b Mon Sep 17 00:00:00 2001 From: Steve Pulec Date: Tue, 24 Sep 2013 10:44:25 -0400 Subject: [PATCH] Update README S3 example to actually work. --- README.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 2562f25d8..4af14f623 100644 --- a/README.md +++ b/README.md @@ -37,10 +37,13 @@ from mymodule import MyModel @mock_s3 def test_my_model_save(): + conn = boto.connect_s3() + # We need to create the bucket since this is all in Moto's 'virtual' AWS account + conn.create_bucket('mybucket') + model_instance = MyModel('steve', 'is awesome') model_instance.save() - conn = boto.connect_s3() assert conn.get_bucket('mybucket').get_key('steve') == 'is awesome' ```