fix test server error

This commit is contained in:
gruebel 2019-10-13 20:32:53 +02:00
parent 0d8c81a211
commit ce3f1eed66
2 changed files with 7 additions and 3 deletions

View File

@ -406,7 +406,11 @@ class SQSResponse(BaseResponse):
queue_name = self._get_queue_name()
tag_keys = self._get_multi_param('TagKey')
self.sqs_backend.untag_queue(queue_name, tag_keys)
try:
self.sqs_backend.untag_queue(queue_name, tag_keys)
except QueueDoesNotExist as e:
return self._error('AWS.SimpleQueueService.NonExistentQueue',
e.description)
template = self.response_template(UNTAG_QUEUE_RESPONSE)
return template.render()

View File

@ -17,7 +17,6 @@ import time
import uuid
from moto import settings, mock_sqs, mock_sqs_deprecated
from moto.sqs.exceptions import QueueDoesNotExist
from tests.helpers import requires_boto_gte
import tests.backport_assert_raises # noqa
from nose.tools import assert_raises
@ -1006,7 +1005,8 @@ def test_untag_queue_errors():
'tag_key_1'
]
).should.throw(
QueueDoesNotExist
ClientError,
"The specified queue does not exist for this wsdl version."
)
client.untag_queue.when.called_with(