Debian Codegraph @

src/globus_sdk/testing/data/transfer/v2/list_bookmarks.py

raw
1 import uuid
2
3 from globus_sdk.testing.models import RegisteredResponse, ResponseSet
4
5 _bookmarks = [
6 {
7 "bookmark_id": str(uuid.uuid4()),
8 "collection_id": str(uuid.uuid4()),
9 "name": "public datasets",
10 "path": "/data_repository/public",
11 "pinned": True,
12 },
13 {
14 "bookmark_id": str(uuid.uuid4()),
15 "collection_id": str(uuid.uuid4()),
16 "name": "private datasets",
17 "path": "/data_repository/private",
18 "pinned": False,
19 },
20 ]
21
22 RESPONSES = ResponseSet(
23 default=RegisteredResponse(
24 service="transfer",
25 method="GET",
26 path="/v2/bookmarks",
27 json={
28 "data": [
29 {
30 "type": "Bookmark",
31 "id": b["bookmark_id"],
32 "attributes": {
33 "name": b["name"],
34 "path": b["path"],
35 "pinned": b["pinned"],
36 },
37 "relationships": {
38 "collection": {
39 "data": {
40 "type": "Collection",
41 "id": b["collection_id"],
42 }
43 }
44 },
45 }
46 for b in _bookmarks
47 ],
48 "meta": {
49 "request_id": "xj8AWyQr8",
50 },
51 "included": [
52 {
53 "type": "Collection",
54 "id": b["collection_id"],
55 "attributes": {
56 "display_name": "Wotsomatta U Dataset Collection",
57 "high_assurance": False,
58 },
59 }
60 for b in _bookmarks
61 ],
62 },
63 ),
64 metadata={"bookmarks": _bookmarks},
65 )