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:
usmangani1 2020-08-27 22:01:20 +05:30 committed by GitHub
commit 0a89f9d1df
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 15 additions and 4 deletions

View file

@ -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()