Debian Codegraph @

tests/functional/services/auth/service_client/test_get_project.py

raw
1 from __future__ import annotations
2
3 import uuid
4
5 import pytest
6
7 from globus_sdk.testing import load_response
8
9
10 @pytest.mark.parametrize(
11 "uuid_type",
12 (str, uuid.UUID),
13 )
14 def test_get_project(
15 service_client,
16 uuid_type: type[str] | type[uuid.UUID],
17 ):
18 meta = load_response(service_client.get_project).metadata
19
20 if uuid_type is str:
21 res = service_client.get_project(meta["project_id"])
22 else:
23 res = service_client.get_project(uuid.UUID(meta["project_id"]))
24
25 assert res["project"]["id"] == meta["project_id"]