Skip to content
This repository has been archived by the owner on May 10, 2024. It is now read-only.

Commit

Permalink
Add bucket creation unit test
Browse files Browse the repository at this point in the history
Add eu-central-1 bucket location unittest
  • Loading branch information
HarryRybacki committed Jul 6, 2015
1 parent 8a90090 commit 29de197
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion tests/unit/s3/test_bucket.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
from tests.unit import AWSMockServiceTestCase

from boto.exception import BotoClientError
from boto.s3.connection import S3Connection
from boto.s3.connection import Location, S3Connection
from boto.s3.bucket import Bucket
from boto.s3.deletemarker import DeleteMarker
from boto.s3.key import Key
Expand All @@ -25,6 +25,14 @@ def test_bucket_create_bucket(self):
bucket = self.service_connection.create_bucket('mybucket_create')
self.assertEqual(bucket.name, 'mybucket_create')

def test_bucket_create_eu_central_1_location(self):
self.set_http_response(status_code=200)
bucket = self.service_connection.create_bucket(
'eu_central_1_bucket',
location=Location.EUCentral1
)
self.assertEqual(bucket.name, 'eu_central_1_bucket')

def test_bucket_constructor(self):
self.set_http_response(status_code=200)
bucket = Bucket(self.service_connection, 'mybucket_constructor')
Expand Down

0 comments on commit 29de197

Please sign in to comment.