Update README S3 example to actually work.

This commit is contained in:
Steve Pulec 2013-09-24 10:44:25 -04:00
parent fe1f3ec06c
commit f805717231

View File

@ -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'
```