Fix:sqs get-queue-attributes response template (#3255)

* Fix:sqs get-queue-attributes response template

* Fix:removed debug statements

* Modified the template

* "fixed build issues"

* Linting

Co-authored-by: usmankb <usman@krazybee.com>
Co-authored-by: Bert Blommers <info@bertblommers.nl>
This commit is contained in:
usmangani1 2020-09-01 22:35:25 +05:30 committed by GitHub
commit 3ea46617d9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 57 additions and 5 deletions

View file

@ -626,7 +626,8 @@ class SQSBackend(BaseBackend):
attributes = queue.attributes
else:
for name in (name for name in attribute_names if name in queue.attributes):
attributes[name] = queue.attributes.get(name)
if queue.attributes.get(name) is not None:
attributes[name] = queue.attributes.get(name)
return attributes

View file

@ -490,10 +490,12 @@ DELETE_QUEUE_RESPONSE = """<DeleteQueueResponse>
GET_QUEUE_ATTRIBUTES_RESPONSE = """<GetQueueAttributesResponse>
<GetQueueAttributesResult>
{% for key, value in attributes.items() %}
<Attribute>
<Name>{{ key }}</Name>
<Value>{{ value }}</Value>
</Attribute>
{% if value is not none %}
<Attribute>
<Name>{{ key }}</Name>
<Value>{{ value }}</Value>
</Attribute>
{% endif %}
{% endfor %}
</GetQueueAttributesResult>
<ResponseMetadata>