Ejemplo n.º 1
0
def test_yamlfmt():
    output = utils.yamlfmt(SIMPLE_ORG_SPEC)
    assert isinstance(output, str)
    dt = datetime.datetime.utcnow()
    output = utils.yamlfmt(dt)
    assert isinstance(output, str)
    account = orgs.OrgAccount(
        orgs.Org(MASTER_ACCOUNT_ID, ORG_ACCESS_ROLE),
        name='account01',
        id='112233445566',
        email='*****@*****.**',
    )
    output = utils.yamlfmt(account)
    assert isinstance(output, str)
Ejemplo n.º 2
0
def test_format_responses():
    org_id, root_id = build_mock_org(SIMPLE_ORG_SPEC)
    crawler = setup_crawler(ORG_ACCESS_ROLE)
    crawler.execute(payloads.get_account_aliases)
    execution = crawler.execute(payloads.get_account_aliases)
    execution_responses = format_responses(execution)
    print(yamlfmt(execution_responses))
    assert isinstance(execution_responses, list)
    for response in execution_responses:
        assert 'Account' in response
        assert 'Regions' in response
Ejemplo n.º 3
0
def test_format_responses():
    MockOrganization().simple()
    crawler = setup_crawler(ORG_ACCESS_ROLE)
    crawler.execute(payload.get_mock_account_alias)
    execution = crawler.execute(payload.get_mock_account_alias)
    execution_responses = format_responses(execution)
    print(yamlfmt(execution_responses))
    assert isinstance(execution_responses, list)
    for response in execution_responses:
        assert 'Account' in response
        assert 'Regions' in response