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
def paginated_environments(environment_uid: str): return get_json(Endpoints.environments_list(environment_uid))