Run black on moto & test directories.

This commit is contained in:
Asher Foa 2019-10-31 08:44:26 -07:00
commit 96e5b1993d
507 changed files with 52541 additions and 47814 deletions

View file

@ -9,19 +9,21 @@ from moto import mock_ec2_deprecated
@mock_ec2_deprecated
def test_create_vpn_connections():
conn = boto.connect_vpc('the_key', 'the_secret')
conn = boto.connect_vpc("the_key", "the_secret")
vpn_connection = conn.create_vpn_connection(
'ipsec.1', 'vgw-0123abcd', 'cgw-0123abcd')
"ipsec.1", "vgw-0123abcd", "cgw-0123abcd"
)
vpn_connection.should_not.be.none
vpn_connection.id.should.match(r'vpn-\w+')
vpn_connection.type.should.equal('ipsec.1')
vpn_connection.id.should.match(r"vpn-\w+")
vpn_connection.type.should.equal("ipsec.1")
@mock_ec2_deprecated
def test_delete_vpn_connections():
conn = boto.connect_vpc('the_key', 'the_secret')
conn = boto.connect_vpc("the_key", "the_secret")
vpn_connection = conn.create_vpn_connection(
'ipsec.1', 'vgw-0123abcd', 'cgw-0123abcd')
"ipsec.1", "vgw-0123abcd", "cgw-0123abcd"
)
list_of_vpn_connections = conn.get_all_vpn_connections()
list_of_vpn_connections.should.have.length_of(1)
conn.delete_vpn_connection(vpn_connection.id)
@ -31,20 +33,20 @@ def test_delete_vpn_connections():
@mock_ec2_deprecated
def test_delete_vpn_connections_bad_id():
conn = boto.connect_vpc('the_key', 'the_secret')
conn = boto.connect_vpc("the_key", "the_secret")
with assert_raises(EC2ResponseError):
conn.delete_vpn_connection('vpn-0123abcd')
conn.delete_vpn_connection("vpn-0123abcd")
@mock_ec2_deprecated
def test_describe_vpn_connections():
conn = boto.connect_vpc('the_key', 'the_secret')
conn = boto.connect_vpc("the_key", "the_secret")
list_of_vpn_connections = conn.get_all_vpn_connections()
list_of_vpn_connections.should.have.length_of(0)
conn.create_vpn_connection('ipsec.1', 'vgw-0123abcd', 'cgw-0123abcd')
conn.create_vpn_connection("ipsec.1", "vgw-0123abcd", "cgw-0123abcd")
list_of_vpn_connections = conn.get_all_vpn_connections()
list_of_vpn_connections.should.have.length_of(1)
vpn = conn.create_vpn_connection('ipsec.1', 'vgw-1234abcd', 'cgw-1234abcd')
vpn = conn.create_vpn_connection("ipsec.1", "vgw-1234abcd", "cgw-1234abcd")
list_of_vpn_connections = conn.get_all_vpn_connections()
list_of_vpn_connections.should.have.length_of(2)
list_of_vpn_connections = conn.get_all_vpn_connections(vpn.id)