organizations: add endpoint list_roots
This commit is contained in:
parent
c40d2be646
commit
6c0c6148f1
6 changed files with 122 additions and 8 deletions
|
|
@ -5,6 +5,7 @@ from moto.organizations import utils
|
|||
|
||||
ORG_ID_REGEX = r'o-[a-z0-9]{%s}' % utils.ORG_ID_SIZE
|
||||
ROOT_ID_REGEX = r'r-[a-z0-9]{%s}' % utils.ROOT_ID_SIZE
|
||||
OU_ID_REGEX = r'ou-[a-z0-9]{%s}-[a-z0-9]{%s}' % (utils.ROOT_ID_SIZE, utils.OU_ID_SUFFIX_SIZE)
|
||||
ACCOUNT_ID_REGEX = r'[0-9]{%s}' % utils.ACCOUNT_ID_SIZE
|
||||
CREATE_ACCOUNT_STATUS_ID_REGEX = r'car-[a-z0-9]{%s}' % utils.CREATE_ACCOUNT_STATUS_ID_SIZE
|
||||
|
||||
|
|
@ -15,8 +16,14 @@ def test_make_random_org_id():
|
|||
|
||||
|
||||
def test_make_random_root_id():
|
||||
org_id = utils.make_random_root_id()
|
||||
org_id.should.match(ROOT_ID_REGEX)
|
||||
root_id = utils.make_random_root_id()
|
||||
root_id.should.match(ROOT_ID_REGEX)
|
||||
|
||||
|
||||
def test_make_random_ou_id():
|
||||
root_id = utils.make_random_root_id()
|
||||
ou_id = utils.make_random_ou_id(root_id)
|
||||
ou_id.should.match(OU_ID_REGEX)
|
||||
|
||||
|
||||
def test_make_random_account_id():
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue