Fix creating SQS queue with same attributes. Closes #1663.
This commit is contained in:
parent
cf71532fa9
commit
1689a2808f
4 changed files with 40 additions and 1 deletions
|
|
@ -40,6 +40,29 @@ def test_create_fifo_queue_fail():
|
|||
raise RuntimeError('Should of raised InvalidParameterValue Exception')
|
||||
|
||||
|
||||
@mock_sqs
|
||||
def test_create_queue_with_different_attributes_fail():
|
||||
sqs = boto3.client('sqs', region_name='us-east-1')
|
||||
|
||||
sqs.create_queue(
|
||||
QueueName='test-queue',
|
||||
Attributes={
|
||||
'VisibilityTimeout': '10',
|
||||
}
|
||||
)
|
||||
try:
|
||||
sqs.create_queue(
|
||||
QueueName='test-queue',
|
||||
Attributes={
|
||||
'VisibilityTimeout': '60',
|
||||
}
|
||||
)
|
||||
except botocore.exceptions.ClientError as err:
|
||||
err.response['Error']['Code'].should.equal('QueueAlreadyExists')
|
||||
else:
|
||||
raise RuntimeError('Should of raised QueueAlreadyExists Exception')
|
||||
|
||||
|
||||
@mock_sqs
|
||||
def test_create_fifo_queue():
|
||||
sqs = boto3.client('sqs', region_name='us-east-1')
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue