@mock_ec2
def test_igw_filter_by_tags():
 conn = boto.connect_vpc(u'the_key', u'the_secret')
 igw1 = conn.create_internet_gateway()
 igw2 = conn.create_internet_gateway()
 igw1.add_tag(u'tests', u'yes')
 result = conn.get_all_internet_gateways(filters={u'tag:tests': u'yes'})
 result.should.have.length_of(1)
 result[0].id.should.equal(igw1.id)

@ mock_ec2 def test_igw_filter_by_tags ( ) : conn = boto . connect_vpc ( u'the_key' , u'the_secret' ) igw1 = conn . create_internet_gateway ( ) igw2 = conn . create_internet_gateway ( ) igw1 . add_tag ( u'tests' , u'yes' ) result = conn . get_all_internet_gateways ( filters = { u'tag:tests' : u'yes' } ) result . should . have . length_of ( 1 ) result [ 0 ] . id . should . equal ( igw1 . id )
internet gateway filter by vpc id .