diff --git a/moto/autoscaling/responses.py b/moto/autoscaling/responses.py index d6fc7a12b..79cb6aeee 100644 --- a/moto/autoscaling/responses.py +++ b/moto/autoscaling/responses.py @@ -241,11 +241,11 @@ DESCRIBE_AUTOSCALING_GROUPS_TEMPLATE = """ {% for tag in group.tags %} - {{ tag.resource_type }} - {{ tag.resource_id }} - {{ tag.propagate_at_launch }} - {{ tag.key }} - {{ tag.value }} + {{ tag.resource_type or tag.ResourceType }} + {{ tag.resource_id or tag.ResourceId }} + {{ tag.propagate_at_launch or tag.PropagateAtLaunch }} + {{ tag.key or tag.Key }} + {{ tag.value or tag.Value }} {% endfor %} diff --git a/tests/test_cloudformation/test_cloudformation_stack_crud_boto3.py b/tests/test_cloudformation/test_cloudformation_stack_crud_boto3.py index d16a2d7b5..94d645a43 100644 --- a/tests/test_cloudformation/test_cloudformation_stack_crud_boto3.py +++ b/tests/test_cloudformation/test_cloudformation_stack_crud_boto3.py @@ -227,5 +227,6 @@ def test_stack_tags(): TemplateBody=dummy_template_json, Tags=tags, ) - - stack.tags.should.equal(tags) + observed_tag_items = set(item for items in [tag.items() for tag in stack.tags] for item in items) + expected_tag_items = set(item for items in [tag.items() for tag in tags] for item in items) + observed_tag_items.should.equal(expected_tag_items)