Debian Codegraph @

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

raw
1 import uuid
2
3 from globus_sdk.testing.models import RegisteredResponse, ResponseSet
4
5 BOOKMARK_ID = str(uuid.uuid4())
6
7 _collection_id = str(uuid.uuid4())
8 _name = "public datasets"
9 _path = "/data_repository/public"
10
11
12 RESPONSES = ResponseSet(
13 default=RegisteredResponse(
14 service="transfer",
15 method="POST",
16 path="/v2/bookmarks",
17 status=201,
18 json={
19 "meta": {"request_id": "nDZoeEMPI"},
20 "data": {
21 "type": "Bookmark",
22 "id": BOOKMARK_ID,
23 "attributes": {
24 "name": _name,
25 "path": _path,
26 "pinned": False,
27 },
28 "relationships": {
29 "collection": {
30 "data": {
31 "type": "Collection",
32 "id": _collection_id,
33 }
34 }
35 },
36 },
37 },
38 metadata={
39 "bookmark_id": BOOKMARK_ID,
40 "collection": _collection_id,
41 "name": _name,
42 "path": _path,
43 },
44 )
45 )