Merge pull request #487 from a1exsh/bugfix/include-load-balancer-name-in-describe-tags-response

Fix ELB.describe_tags with multiple LoadBalancerNames.
This commit is contained in:
Steve Pulec 2016-01-17 16:34:20 -05:00
commit fe090d7bb5
2 changed files with 28 additions and 2 deletions

View file

@ -698,3 +698,24 @@ def test_add_remove_tags():
tags.should.have.key('i').which.should.equal('b')
tags.should.have.key('j').which.should.equal('c')
client.create_load_balancer(
LoadBalancerName='other-lb',
Listeners=[{'Protocol':'tcp', 'LoadBalancerPort':433, 'InstancePort':8433}],
AvailabilityZones=['us-east-1a', 'us-east-1b']
)
client.add_tags(LoadBalancerNames=['other-lb'],
Tags=[{
'Key': 'other',
'Value': 'something'
}])
lb_tags = dict([(l['LoadBalancerName'], dict([(d['Key'], d['Value']) for d in l['Tags']]))
for l in client.describe_tags(LoadBalancerNames=['my-lb', 'other-lb'])['TagDescriptions']])
lb_tags.should.have.key('my-lb')
lb_tags.should.have.key('other-lb')
lb_tags['my-lb'].shouldnt.have.key('other')
lb_tags['other-lb'].should.have.key('other').which.should.equal('something')