Organizations: setting default FeatureSet to ALL in create_organization (#5497)

This commit is contained in:
David 2022-09-28 11:29:43 +02:00 committed by GitHub
parent 87b3004057
commit d4d6e3b939
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 1 deletions

View File

@ -355,7 +355,7 @@ class OrganizationsBackend(BaseBackend):
return root
def create_organization(self, **kwargs):
self.org = FakeOrganization(self.account_id, kwargs["FeatureSet"])
self.org = FakeOrganization(self.account_id, kwargs.get("FeatureSet") or "ALL")
root_ou = FakeRoot(self.org)
self.ou.append(root_ou)
master_account = FakeAccount(

View File

@ -57,6 +57,15 @@ def test_create_organization():
master_account["Name"].should.equal("master")
@mock_organizations
def test_create_organization_without_feature_set():
client = boto3.client("organizations", region_name="us-east-1")
client.create_organization()
response = client.describe_organization()
validate_organization(response)
response["Organization"]["FeatureSet"].should.equal("ALL")
@mock_organizations
def test_describe_organization():
client = boto3.client("organizations", region_name="us-east-1")