Fix dict syntax for python-2.6 in test_elb

This commit is contained in:
Oleksandr Shulgin 2015-12-14 12:55:34 +01:00
parent 1ed5f50d56
commit ef4332d892

View File

@ -711,7 +711,8 @@ def test_add_remove_tags():
'Value': 'something'
}])
lb_tags = { l['LoadBalancerName']: { d['Key']: d['Value'] for d in l['Tags'] } for l in client.describe_tags(LoadBalancerNames=['my-lb', 'other-lb'])['TagDescriptions'] }
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')