Run black on moto & test directories.
This commit is contained in:
parent
c820395dbf
commit
96e5b1993d
507 changed files with 52541 additions and 47814 deletions
|
|
@ -9,7 +9,7 @@ from moto import mock_ec2, mock_ec2_deprecated
|
|||
|
||||
@mock_ec2_deprecated
|
||||
def test_describe_regions():
|
||||
conn = boto.connect_ec2('the_key', 'the_secret')
|
||||
conn = boto.connect_ec2("the_key", "the_secret")
|
||||
regions = conn.get_all_regions()
|
||||
regions.should.have.length_of(16)
|
||||
for region in regions:
|
||||
|
|
@ -18,7 +18,7 @@ def test_describe_regions():
|
|||
|
||||
@mock_ec2_deprecated
|
||||
def test_availability_zones():
|
||||
conn = boto.connect_ec2('the_key', 'the_secret')
|
||||
conn = boto.connect_ec2("the_key", "the_secret")
|
||||
regions = conn.get_all_regions()
|
||||
for region in regions:
|
||||
conn = boto.ec2.connect_to_region(region.name)
|
||||
|
|
@ -30,25 +30,25 @@ def test_availability_zones():
|
|||
|
||||
@mock_ec2
|
||||
def test_boto3_describe_regions():
|
||||
ec2 = boto3.client('ec2', 'us-east-1')
|
||||
ec2 = boto3.client("ec2", "us-east-1")
|
||||
resp = ec2.describe_regions()
|
||||
resp['Regions'].should.have.length_of(16)
|
||||
for rec in resp['Regions']:
|
||||
rec['Endpoint'].should.contain(rec['RegionName'])
|
||||
resp["Regions"].should.have.length_of(16)
|
||||
for rec in resp["Regions"]:
|
||||
rec["Endpoint"].should.contain(rec["RegionName"])
|
||||
|
||||
test_region = 'us-east-1'
|
||||
test_region = "us-east-1"
|
||||
resp = ec2.describe_regions(RegionNames=[test_region])
|
||||
resp['Regions'].should.have.length_of(1)
|
||||
resp['Regions'][0].should.have.key('RegionName').which.should.equal(test_region)
|
||||
resp["Regions"].should.have.length_of(1)
|
||||
resp["Regions"][0].should.have.key("RegionName").which.should.equal(test_region)
|
||||
|
||||
|
||||
@mock_ec2
|
||||
def test_boto3_availability_zones():
|
||||
ec2 = boto3.client('ec2', 'us-east-1')
|
||||
ec2 = boto3.client("ec2", "us-east-1")
|
||||
resp = ec2.describe_regions()
|
||||
regions = [r['RegionName'] for r in resp['Regions']]
|
||||
regions = [r["RegionName"] for r in resp["Regions"]]
|
||||
for region in regions:
|
||||
conn = boto3.client('ec2', region)
|
||||
conn = boto3.client("ec2", region)
|
||||
resp = conn.describe_availability_zones()
|
||||
for rec in resp['AvailabilityZones']:
|
||||
rec['ZoneName'].should.contain(region)
|
||||
for rec in resp["AvailabilityZones"]:
|
||||
rec["ZoneName"].should.contain(region)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue