示例#1
0
文件: test_list.py 项目: kvh/snapflow
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
示例#2
0
def paginated_graphs(organization_uid: str):
    return get_json(Endpoints.graphs_list(organization_uid))