<s> from __future__ import unicode_literals <EOL> import boto <EOL> from nose . tools import assert_raises <EOL> import sure <EOL> from boto . exception import EC2ResponseError <EOL> from moto import mock_ec2 <EOL> @ mock_ec2 <EOL> def test_create_vpn_connections ( ) : <EOL> conn = boto . connect_vpc ( '<STR_LIT>' , '<STR_LIT>' ) <EOL> vpn_connection = conn . create_vpn_connection ( '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' ) <EOL> vpn_connection . should_not . be . none <EOL> vpn_connection . id . should . match ( r'<STR_LIT>' ) <EOL> vpn_connection . type . should . equal ( '<STR_LIT>' ) <EOL> @ mock_ec2 <EOL> def test_delete_vpn_connections ( ) : <EOL> conn = boto . connect_vpc ( '<STR_LIT>' , '<STR_LIT>' ) <EOL> vpn_connection = conn . create_vpn_connection ( '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' ) <EOL> list_of_vpn_connections = conn . get_all_vpn_connections ( ) <EOL> list_of_vpn_connections . should . have . length_of ( <NUM_LIT:1> ) <EOL> conn . delete_vpn_connection ( vpn_connection . id ) <EOL> list_of_vpn_connections = conn . get_all_vpn_connections ( ) <EOL> list_of_vpn_connections . should . have . length_of ( <NUM_LIT:0> ) <EOL> @ mock_ec2 <EOL> def test_delete_vpn_connections_bad_id ( ) : <EOL> conn = boto . connect_vpc ( '<STR_LIT>' , '<STR_LIT>' ) <EOL> with assert_raises ( EC2ResponseError ) : <EOL> conn . delete_vpn_connection ( '<STR_LIT>' ) <EOL> @ mock_ec2 <EOL> def test_describe_vpn_connections ( ) : <EOL> conn = boto . connect_vpc ( '<STR_LIT>' , '<STR_LIT>' ) <EOL> list_of_vpn_connections = conn . get_all_vpn_connections ( ) <EOL> list_of_vpn_connections . should . have . length_of ( <NUM_LIT:0> ) <EOL> conn . create_vpn_connection ( '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' ) <EOL> list_of_vpn_connections = conn . get_all_vpn_connections ( ) <EOL> list_of_vpn_connections . should . have . length_of ( <NUM_LIT:1> ) <EOL> vpn = conn . create_vpn_connection ( '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' ) <EOL> list_of_vpn_connections = conn . get_all_vpn_connections ( ) <EOL> list_of_vpn_connections . should . have . length_of ( <NUM_LIT:2> ) <EOL> list_of_vpn_connections = conn . get_all_vpn_connections ( vpn . id ) <EOL> list_of_vpn_connections . should . have . length_of ( <NUM_LIT:1> ) </s>
