Debian Codegraph @

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

raw
1 from globus_sdk.testing import load_response
2
3
4 def test_get_consents(service_client):
5 meta = load_response(service_client.get_consents).metadata
6 res = service_client.get_consents(meta["identity_id"])
7
8 forest = res.to_forest()
9 assert len(forest.nodes) == 2
10 assert len(forest.trees) == 1
11 tree = forest.trees[0]
12 assert forest.trees[0].max_depth == 2
13 assert tree.root.scope_name.endswith("transfer.api.globus.org:all")
14 children = [tree.get_node(child_id) for child_id in tree.edges[tree.root.id]]
15 assert len(children) == 1
16 assert children[0].scope_name.endswith("data_access")