Changeset View
Changeset View
Standalone View
Standalone View
swh/graphql/tests/functional/test_revision.py
Show First 20 Lines • Show All 88 Lines • ▼ Show 20 Lines | |||||
def test_get_revision_as_target(client): | def test_get_revision_as_target(client): | ||||
# SWHID of a snapshot with revision as target | # SWHID of a snapshot with revision as target | ||||
snapshot_swhid = "swh:1:snp:9e78d7105c5e0f886487511e2a92377b4ee4c32a" | snapshot_swhid = "swh:1:snp:9e78d7105c5e0f886487511e2a92377b4ee4c32a" | ||||
query_str = """ | query_str = """ | ||||
{ | { | ||||
snapshot(swhid: "%s") { | snapshot(swhid: "%s") { | ||||
branches(first: 1, types: [revision]) { | branches(first: 1, types: [revision]) { | ||||
nodes { | nodes { | ||||
type | targetType | ||||
target { | target { | ||||
...on Revision { | ...on Revision { | ||||
swhid | swhid | ||||
} | } | ||||
} | } | ||||
} | } | ||||
} | } | ||||
} | } | ||||
▲ Show 20 Lines • Show All 55 Lines • Show Last 20 Lines |