Merge pull request #2921 from getglad/support_optin_regions

Support OptInStatus for EC2 describe_region calls
This commit is contained in:
Steve Pulec 2020-04-27 19:42:04 -05:00 committed by GitHub
commit f33e810e15
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 51 additions and 4 deletions

View file

@ -40,6 +40,15 @@ 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"
)
test_region = "ap-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"][0].should.have.key("OptInStatus").which.should.equal("not-opted-in")
@mock_ec2