test(#1959): LocationConstraint us-east-1 should be refused
This commit is contained in:
parent
96f9896885
commit
9291ff533a
@ -1300,6 +1300,16 @@ def test_bucket_create_duplicate():
|
|||||||
exc.exception.response['Error']['Code'].should.equal('BucketAlreadyExists')
|
exc.exception.response['Error']['Code'].should.equal('BucketAlreadyExists')
|
||||||
|
|
||||||
|
|
||||||
|
@mock_s3
|
||||||
|
def test_bucket_create_force_us_east_1():
|
||||||
|
s3 = boto3.resource('s3', region_name='us-east-1')
|
||||||
|
with assert_raises(ClientError) as exc:
|
||||||
|
s3.create_bucket(Bucket="blah", CreateBucketConfiguration={
|
||||||
|
'LocationConstraint': 'us-east-1',
|
||||||
|
})
|
||||||
|
exc.exception.response['Error']['Code'].should.equal('InvalidLocationConstraint')
|
||||||
|
|
||||||
|
|
||||||
@mock_s3
|
@mock_s3
|
||||||
def test_boto3_bucket_create_eu_central():
|
def test_boto3_bucket_create_eu_central():
|
||||||
s3 = boto3.resource('s3', region_name='eu-central-1')
|
s3 = boto3.resource('s3', region_name='eu-central-1')
|
||||||
|
Loading…
Reference in New Issue
Block a user