Skip to content

Commit

Permalink
organizations: add exception test for describe_organization endpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
ashleygould committed Oct 8, 2018
1 parent 95700d6 commit 7a88e63
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions tests/test_organizations/test_organizations_boto3.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,17 @@ def test_describe_organization():
validate_organization(response)


@mock_organizations
def test_describe_organization_exception():
client = boto3.client('organizations', region_name='us-east-1')
with assert_raises(ClientError) as e:
response = client.describe_organization()
ex = e.exception
ex.operation_name.should.equal('DescribeOrganization')
ex.response['Error']['Code'].should.equal('400')
ex.response['Error']['Message'].should.contain('AWSOrganizationsNotInUseException')


# Organizational Units

@mock_organizations
Expand Down

0 comments on commit 7a88e63

Please sign in to comment.