@mock_ec2_deprecated
def test_get_all_tags_value_filter():
    conn = boto.connect_ec2('the_key', 'the_secret')
    reservation = conn.run_instances(EXAMPLE_AMI_ID)
    instance = reservation.instances[0]
    instance.add_tag('an instance key', 'some value')
    reservation_b = conn.run_instances(EXAMPLE_AMI_ID)
    instance_b = reservation_b.instances[0]
    instance_b.add_tag('an instance key', 'some other value')
    reservation_c = conn.run_instances(EXAMPLE_AMI_ID)
    instance_c = reservation_c.instances[0]
    instance_c.add_tag('an instance key', 'other value*')
    reservation_d = conn.run_instances(EXAMPLE_AMI_ID)
    instance_d = reservation_d.instances[0]
    instance_d.add_tag('an instance key', 'other value**')
    reservation_e = conn.run_instances(EXAMPLE_AMI_ID)
    instance_e = reservation_e.instances[0]
    instance_e.add_tag('an instance key', 'other value*?')
    image_id = conn.create_image(instance.id, 'test-ami', 'this is a test ami')
    image = conn.get_image(image_id)
    image.add_tag('an image key', 'some value')
    tags = conn.get_all_tags(filters={'value': 'some value'})
    tags.should.have.length_of(2)
    tags = conn.get_all_tags(filters={'value': 'some*value'})
    tags.should.have.length_of(3)
    tags = conn.get_all_tags(filters={'value': '*some*value'})
    tags.should.have.length_of(3)
    tags = conn.get_all_tags(filters={'value': '*some*value*'})
    tags.should.have.length_of(3)
    tags = conn.get_all_tags(filters={'value': '*value\\*'})
    tags.should.have.length_of(1)
    tags = conn.get_all_tags(filters={'value': '*value\\*\\*'})
    tags.should.have.length_of(1)
    tags = conn.get_all_tags(filters={'value': '*value\\*\\?'})
    tags.should.have.length_of(1)
@mock_ec2_deprecated
def test_get_all_tags_value_filter():
    conn = boto.connect_ec2('the_key', 'the_secret')
    reservation = conn.run_instances(EXAMPLE_AMI_ID)
    instance = reservation.instances[0]
    instance.add_tag('an instance key', 'some value')
    reservation_b = conn.run_instances(EXAMPLE_AMI_ID)
    instance_b = reservation_b.instances[0]
    instance_b.add_tag('an instance key', 'some other value')
    reservation_c = conn.run_instances(EXAMPLE_AMI_ID)
    instance_c = reservation_c.instances[0]
    instance_c.add_tag('an instance key', 'other value*')
    reservation_d = conn.run_instances(EXAMPLE_AMI_ID)
    instance_d = reservation_d.instances[0]
    instance_d.add_tag('an instance key', 'other value**')
    reservation_e = conn.run_instances(EXAMPLE_AMI_ID)
    instance_e = reservation_e.instances[0]
    instance_e.add_tag('an instance key', 'other value*?')
    image_id = conn.create_image(instance.id, 'test-ami', 'this is a test ami')
    image = conn.get_image(image_id)
    image.add_tag('an image key', 'some value')
    tags = conn.get_all_tags(filters={'value': 'some value'})
    tags.should.have.length_of(2)
    tags = conn.get_all_tags(filters={'value': 'some*value'})
    tags.should.have.length_of(3)
    tags = conn.get_all_tags(filters={'value': '*some*value'})
    tags.should.have.length_of(3)
    tags = conn.get_all_tags(filters={'value': '*some*value*'})
    tags.should.have.length_of(3)
    tags = conn.get_all_tags(filters={'value': '*value\\*'})
    tags.should.have.length_of(1)
    tags = conn.get_all_tags(filters={'value': '*value\\*\\*'})
    tags.should.have.length_of(1)
    tags = conn.get_all_tags(filters={'value': '*value\\*\\?'})
    tags.should.have.length_of(1)