Add error handling for sqs.list_queue_tags
This commit is contained in:
parent
dbfb319def
commit
19a34ea57a
2 changed files with 25 additions and 1 deletions
|
|
@ -1108,6 +1108,26 @@ def test_tags():
|
|||
})
|
||||
|
||||
|
||||
@mock_sqs
|
||||
def test_list_queue_tags_errors():
|
||||
client = boto3.client('sqs', region_name='us-east-1')
|
||||
|
||||
response = client.create_queue(
|
||||
QueueName='test-queue-with-tags',
|
||||
tags={
|
||||
'tag_key_1': 'tag_value_X'
|
||||
}
|
||||
)
|
||||
queue_url = response['QueueUrl']
|
||||
|
||||
client.list_queue_tags.when.called_with(
|
||||
QueueUrl=queue_url + '-not-existing',
|
||||
).should.throw(
|
||||
ClientError,
|
||||
'The specified queue does not exist for this wsdl version.'
|
||||
)
|
||||
|
||||
|
||||
@mock_sqs
|
||||
def test_tag_queue_errors():
|
||||
client = boto3.client('sqs', region_name='us-east-1')
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue