added more wildcard test for tags

This commit is contained in:
Kieran Doonan 2016-07-05 11:31:47 +01:00
parent d3dcb8d3b5
commit 5f770ffabb

View File

@ -348,7 +348,7 @@ def test_retrieved_snapshots_must_contain_their_tags():
@mock_ec2
def test_filter_instances_by_tags():
def test_filter_instances_by_wildcard_tags():
conn = boto.connect_ec2(aws_access_key_id='the_key', aws_secret_access_key='the_secret')
reservation = conn.run_instances('ami-1234abcd')
instance_a = reservation.instances[0]
@ -359,3 +359,9 @@ def test_filter_instances_by_tags():
reservations = conn.get_all_instances(filters={'tag:Key1': 'Value*'})
reservations.should.have.length_of(2)
reservations = conn.get_all_instances(filters={'tag-key': 'Key*'})
reservations.should.have.length_of(2)
reservations = conn.get_all_instances(filters={'tag-value': 'Value*'})
reservations.should.have.length_of(2)