Exemple #1
0
def test_list(tmp_path: Path):
    set_tmp_dir(tmp_path)
    with request_mocker() as m:
        for e in [
                Endpoints.environments_list("test-org-uid"),
                Endpoints.graphs_list("test-org-uid"),
        ]:
            m.get(
                API_BASE_URL + e,
                json={
                    "results": [{
                        "name": "name"
                    }],
                    "next": None
                },
            )
        result = run_cli("list environments --json")
        assert "name" in result.output
        result = run_cli("list graphs --json")
        assert "name" in result.output
Exemple #2
0
def paginated_graphs(organization_uid: str):
    return get_json(Endpoints.graphs_list(organization_uid))