Merge pull request #2399 from dkuntz2/route53-fix-empty-tags
Don't error out on route53.list_tags_for_resource when resource has no tags
This commit is contained in:
commit
0f3957ffad
@ -305,6 +305,7 @@ class Route53Backend(BaseBackend):
|
||||
def list_tags_for_resource(self, resource_id):
|
||||
if resource_id in self.resource_tags:
|
||||
return self.resource_tags[resource_id]
|
||||
return {}
|
||||
|
||||
def get_all_hosted_zones(self):
|
||||
return self.zones.values()
|
||||
|
@ -404,6 +404,11 @@ def test_list_or_change_tags_for_resource_request():
|
||||
)
|
||||
healthcheck_id = health_check['HealthCheck']['Id']
|
||||
|
||||
# confirm this works for resources with zero tags
|
||||
response = conn.list_tags_for_resource(
|
||||
ResourceType="healthcheck", ResourceId=healthcheck_id)
|
||||
response["ResourceTagSet"]["Tags"].should.be.empty
|
||||
|
||||
tag1 = {"Key": "Deploy", "Value": "True"}
|
||||
tag2 = {"Key": "Name", "Value": "UnitTest"}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user