#NEWLINE# def test_attach_vpn_gateway_idempotent( self ) : #NEWLINE# #INDENT# self . configure ( external_network = fakes . NAME_OS_PUBLIC_NETWORK ) #NEWLINE# self . set_mock_db_items ( fakes . DB_VPN_GATEWAY_1 , fakes . DB_VPC_1 ) #NEWLINE# resp = self . execute ( 'AttachVpnGateway' , { #NEWLINE# #INDENT# 'VpcId' : fakes . ID_EC2_VPC_1 , #NEWLINE# 'VpnGatewayId' : fakes . ID_EC2_VPN_GATEWAY_1 , #NEWLINE# #UNINDENT# } ) #NEWLINE# self . assertEqual ( { #NEWLINE# #INDENT# 'attachment' : { #NEWLINE# #INDENT# 'state' : 'attached' , #NEWLINE# 'vpcId' : fakes . ID_EC2_VPC_1 , #NEWLINE# #UNINDENT# } , #NEWLINE# #UNINDENT# } , resp ) #NEWLINE# self . assertFalse ( self . db_api . update_item . called ) #NEWLINE# self . assertFalse ( self . neutron . add_gateway_router . called ) #NEWLINE# self . assertFalse ( resp . neutron . create_vpnservice . called )