#NEWLINE# def test_create_attach_internet_gateway( self ) : #NEWLINE# #INDENT# data = self . client . create_internet_gateway ( ) #NEWLINE# gw_id = self [ 'InternetGateway' ] [ 'InternetGatewayId' ] #NEWLINE# res_clean = self . addResourceCleanUp ( self . client . delete_internet_gateway , InternetGatewayId = gw_id ) #NEWLINE# self . assertEmpty ( data [ 'InternetGateway' ] . get ( 'Attachments' , [ ] ) ) #NEWLINE# data = self . client . attach_internet_gateway ( VpcId = self . vpc_id , InternetGatewayId = gw_id ) #NEWLINE# data = self . client . detach_internet_gateway ( VpcId = self . vpc_id , InternetGatewayId = gw_id ) #NEWLINE# data = self . client . delete_internet_gateway ( InternetGatewayId = gw_id ) #NEWLINE# self . cancelResourceCleanUp ( res_clean ) #NEWLINE# self . assertRaises ( 'InvalidInternetGatewayID.NotFound' , self . client . describe_internet_gateways , InternetGatewayIds = [ gw_id ] )