Fix:SQS:Added Non existent queue name in ERROR RESPONSE (#3261)
* Fix:SQS:Added Non existent queue name in ERROR RESPONSE * Linting Co-authored-by: Bert Blommers <info@bertblommers.nl>
This commit is contained in:
parent
1c939a5f06
commit
0a89f9d1df
2 changed files with 15 additions and 4 deletions
|
|
@ -198,7 +198,8 @@ def test_get_queue_url_errors():
|
|||
client = boto3.client("sqs", region_name="us-east-1")
|
||||
|
||||
client.get_queue_url.when.called_with(QueueName="non-existing-queue").should.throw(
|
||||
ClientError, "The specified queue does not exist for this wsdl version."
|
||||
ClientError,
|
||||
"The specified queue non-existing-queue does not exist for this wsdl version.",
|
||||
)
|
||||
|
||||
|
||||
|
|
@ -206,10 +207,13 @@ def test_get_queue_url_errors():
|
|||
def test_get_nonexistent_queue():
|
||||
sqs = boto3.resource("sqs", region_name="us-east-1")
|
||||
with assert_raises(ClientError) as err:
|
||||
sqs.get_queue_by_name(QueueName="nonexisting-queue")
|
||||
sqs.get_queue_by_name(QueueName="non-existing-queue")
|
||||
ex = err.exception
|
||||
ex.operation_name.should.equal("GetQueueUrl")
|
||||
ex.response["Error"]["Code"].should.equal("AWS.SimpleQueueService.NonExistentQueue")
|
||||
ex.response["Error"]["Message"].should.equal(
|
||||
"The specified queue non-existing-queue does not exist for this wsdl version."
|
||||
)
|
||||
|
||||
with assert_raises(ClientError) as err:
|
||||
sqs.Queue("http://whatever-incorrect-queue-address").load()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue