예제 #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_environments(environment_uid: str):
    return get_json(Endpoints.environments_list(environment_uid))