Debian Codegraph @

src/globus_sdk/testing/data/auth/get_project.py

raw
1 import uuid
2
3 from globus_sdk.testing.models import RegisteredResponse, ResponseSet
4
5 GUARDIANS_IDP_ID = str(uuid.uuid1())
6 STAR_LORD = {
7 "identity_provider": GUARDIANS_IDP_ID,
8 "identity_type": "login",
9 "organization": "Guardians of the Galaxy",
10 "status": "used",
11 "id": str(uuid.uuid1()),
12 "name": "Star Lord",
13 "username": "[email protected]",
14 # I thought it would be funny if he didn't get 'star.lord'
15 # because someone else got it first
16 "email": "[email protected]",
17 }
18 ROCKET_RACCOON = {
19 "identity_provider": GUARDIANS_IDP_ID,
20 "identity_type": "login",
21 "organization": "Guardians of the Galaxy",
22 "status": "used",
23 "id": str(uuid.uuid1()),
24 "name": "Rocket",
25 "username": "[email protected]",
26 # and think about it, who else would try to lay claim
27 # to that email address?
28 "email": "[email protected]",
29 }
30
31 GUARDIANS_PROJECT = {
32 "admin_ids": [ROCKET_RACCOON["id"]],
33 "contact_email": "[email protected]",
34 "display_name": "Guardians of the Galaxy Portal",
35 "admin_group_ids": None,
36 "id": str(uuid.uuid1()),
37 "project_name": "Guardians of the Galaxy Portal",
38 "admins": {
39 "identities": [STAR_LORD, ROCKET_RACCOON],
40 "groups": [],
41 },
42 }
43
44 RESPONSES = ResponseSet(
45 default=RegisteredResponse(
46 service="auth",
47 path=f"/v2/api/projects/{GUARDIANS_PROJECT['id']}",
48 json={"project": GUARDIANS_PROJECT},
49 metadata={
50 "project_id": GUARDIANS_PROJECT["id"],
51 },
52 )
53 )