@mock_ec2
def test_retrieve_resource_with_multiple_tags():
    ec2 = boto3.resource('ec2', region_name='us-west-1')
    (blue, green) = ec2.create_instances(ImageId=EXAMPLE_AMI_ID, MinCount=2, MaxCount=2)
    ec2.create_tags(Resources=[blue.instance_id], Tags=[{'Key': 'environment', 'Value': 'blue'}, {'Key': 'application', 'Value': 'api'}])
    ec2.create_tags(Resources=[green.instance_id], Tags=[{'Key': 'environment', 'Value': 'green'}, {'Key': 'application', 'Value': 'api'}])
    green_instances = list(ec2.instances.filter(Filters=get_filter('green')))
    green_instances.should.equal([green])
    blue_instances = list(ec2.instances.filter(Filters=get_filter('blue')))
    blue_instances.should.equal([blue])
@mock_ec2
def test_retrieve_resource_with_multiple_tags():
    ec2 = boto3.resource('ec2', region_name='us-west-1')
    (blue, green) = ec2.create_instances(ImageId=EXAMPLE_AMI_ID, MinCount=2, MaxCount=2)
    ec2.create_tags(Resources=[blue.instance_id], Tags=[{'Key': 'environment', 'Value': 'blue'}, {'Key': 'application', 'Value': 'api'}])
    ec2.create_tags(Resources=[green.instance_id], Tags=[{'Key': 'environment', 'Value': 'green'}, {'Key': 'application', 'Value': 'api'}])
    green_instances = list(ec2.instances.filter(Filters=get_filter('green')))
    green_instances.should.equal([green])
    blue_instances = list(ec2.instances.filter(Filters=get_filter('blue')))
    blue_instances.should.equal([blue])