How to use the atlasapi.api.AtlasAPI function in atlasapi

To help you get started, we’ve selected a few atlasapi examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github jdrumgoole / MongoDB-Atlas-API / atlasapi / test_atlasapi.py View on Github external
def test_atlas_projects():

    api = AtlasAPI()
    projects = api.get_projects("5a141a774e65811a132a8010")
    assert projects is not None
    assert list(projects) is not None
    assert len(list(projects)) >= 0
github jdrumgoole / MongoDB-Atlas-API / atlasapi / test_atlasapi.py View on Github external
def test_atlas_cluster():

    api = AtlasAPI()
    cluster = api.get_cluster("5a141a774e65811a132a8010", "Foodapedia")
    assert cluster is not None
    assert cluster.name == "Foodapedia"
github jdrumgoole / MongoDB-Atlas-API / atlasapi / test_atlasapi.py View on Github external
def test_atlas_project():

    api = AtlasAPI()
    project = api.get_project("5a141a774e65811a132a8010")
    assert project is not None
    assert project.id == "5a141a774e65811a132a8010"
github jdrumgoole / MongoDB-Atlas-API / atlasapi / test_atlasapi.py View on Github external
def test_atlas_organization():

    api = AtlasAPI()
    org = api.get_organization("599eeced9f78f769464d175c")
    assert org is not None
    assert org.id == "599eeced9f78f769464d175c"
github jdrumgoole / MongoDB-Atlas-API / atlasapi / test_atlasapi.py View on Github external
def test_atlas_organisations():

    api = AtlasAPI()
    orgs = api.get_organisations(limi=200)
    list_of_orgs = list(orgs)
    assert list_of_orgs is not None
    assert len(list_of_orgs) == 200

    with pytest.raises(AtlasInitialisationError):
        api = AtlasAPI(page_size=0)

    with pytest.raises(AtlasInitialisationError):
        api = AtlasAPI(page_size=501)

    with pytest.raises(AtlasInitialisationError):
        api = AtlasAPI(page_size=-1)
github jdrumgoole / MongoDB-Atlas-API / atlasapi / test_atlasapi.py View on Github external
def test_atlas_clusters():

    api = AtlasAPI()
    clusters = api.get_clusters("5a141a774e65811a132a8010")
    assert clusters is not None
    assert list(clusters) is not None
    assert len(list(clusters)) >= 0
github jdrumgoole / MongoDB-Atlas-API / atlasapi / test_atlasapi.py View on Github external
def test_atlas_organisations():

    api = AtlasAPI()
    orgs = api.get_organisations(limi=200)
    list_of_orgs = list(orgs)
    assert list_of_orgs is not None
    assert len(list_of_orgs) == 200

    with pytest.raises(AtlasInitialisationError):
        api = AtlasAPI(page_size=0)

    with pytest.raises(AtlasInitialisationError):
        api = AtlasAPI(page_size=501)

    with pytest.raises(AtlasInitialisationError):
        api = AtlasAPI(page_size=-1)