From 59c1f0e1313ae362b192dfbc98b698129157a660 Mon Sep 17 00:00:00 2001 From: Matthew Gladney Date: Fri, 24 Apr 2020 14:20:58 -0400 Subject: [PATCH] black reformatting changes --- moto/ec2/models.py | 25 +++++++++++++------ .../test_availability_zones_and_regions.py | 4 ++- 2 files changed, 20 insertions(+), 9 deletions(-) diff --git a/moto/ec2/models.py b/moto/ec2/models.py index 7a9351209..7f7b6369e 100644 --- a/moto/ec2/models.py +++ b/moto/ec2/models.py @@ -1504,21 +1504,30 @@ class Zone(object): class RegionsAndZonesBackend(object): - regions_not_enabled_by_default = [ - 'ap-east-1', - 'me-south-1' - ] + regions_not_enabled_by_default = ["ap-east-1", "me-south-1"] regions = [] for region in Session().get_available_regions("ec2"): if region in regions_not_enabled_by_default: - regions.append(Region(region, "ec2.{}.amazonaws.com".format(region), "not-opted-in")) + regions.append( + Region(region, "ec2.{}.amazonaws.com".format(region), "not-opted-in") + ) else: - regions.append(Region(region, "ec2.{}.amazonaws.com".format(region), "opt-in-not-required")) + regions.append( + Region( + region, "ec2.{}.amazonaws.com".format(region), "opt-in-not-required" + ) + ) for region in Session().get_available_regions("ec2", partition_name="aws-us-gov"): - regions.append(Region(region, "ec2.{}.amazonaws.com".format(region), "opt-in-not-required")) + regions.append( + Region(region, "ec2.{}.amazonaws.com".format(region), "opt-in-not-required") + ) for region in Session().get_available_regions("ec2", partition_name="aws-cn"): - regions.append(Region(region, "ec2.{}.amazonaws.com.cn".format(region), "opt-in-not-required")) + regions.append( + Region( + region, "ec2.{}.amazonaws.com.cn".format(region), "opt-in-not-required" + ) + ) zones = { "af-south-1": [ diff --git a/tests/test_ec2/test_availability_zones_and_regions.py b/tests/test_ec2/test_availability_zones_and_regions.py index 92fb2b657..830d4c2bf 100644 --- a/tests/test_ec2/test_availability_zones_and_regions.py +++ b/tests/test_ec2/test_availability_zones_and_regions.py @@ -40,7 +40,9 @@ def test_boto3_describe_regions(): 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"][0].should.have.key("OptInStatus").which.should.equal("opt-in-not-required") + resp["Regions"][0].should.have.key("OptInStatus").which.should.equal( + "opt-in-not-required" + ) test_region = "ap-east-1" resp = ec2.describe_regions(RegionNames=[test_region])