@mock_s3
def test_create_existing_bucket_in_us_east_1():
 u'"\n    http://docs.aws.amazon.com/AmazonS3/latest/API/ErrorResponses.html\n    Your previous request to create the named bucket succeeded and you already\n    own it. You get this error in all AWS regions except US Standard,\n    us-east-1. In us-east-1 region, you will get 200 OK, but it is no-op (if\n    bucket exists it Amazon S3 will not do anything).\n    '
 conn = boto.s3.connect_to_region(u'us-east-1')
 conn.create_bucket(u'foobar')
 bucket = conn.create_bucket(u'foobar')
 bucket.name.should.equal(u'foobar')

@ mock_s3 def test_create_existing_bucket_in_us_east_1 ( ) : conn = boto . s3 . connect_to_region ( u'us-east-1' ) conn . create_bucket ( u'foobar' ) bucket = conn . create_bucket ( u'foobar' ) bucket . name . should . equal ( u'foobar' )
trying to create a bucket that already exists in us-east-1 returns the bucket .