Changeset View
Changeset View
Standalone View
Standalone View
swh/graph/tests/test_grpc.py
# Copyright (c) 2022 The Software Heritage developers | # Copyright (c) 2022 The Software Heritage developers | ||||
# See the AUTHORS file at the top-level directory of this distribution | # See the AUTHORS file at the top-level directory of this distribution | ||||
# License: GNU General Public License version 3, or any later version | # License: GNU General Public License version 3, or any later version | ||||
# See top-level LICENSE file for more information | # See top-level LICENSE file for more information | ||||
import hashlib | import hashlib | ||||
from google.protobuf.field_mask_pb2 import FieldMask | from google.protobuf.field_mask_pb2 import FieldMask | ||||
from swh.graph.rpc.swhgraph_pb2 import ( | from swh.graph.grpc.swhgraph_pb2 import ( | ||||
GraphDirection, | GraphDirection, | ||||
NodeFilter, | NodeFilter, | ||||
StatsRequest, | StatsRequest, | ||||
TraversalRequest, | TraversalRequest, | ||||
) | ) | ||||
TEST_ORIGIN_ID = "swh:1:ori:{}".format( | TEST_ORIGIN_ID = "swh:1:ori:{}".format( | ||||
hashlib.sha1(b"https://example.com/swh/graph").hexdigest() | hashlib.sha1(b"https://example.com/swh/graph").hexdigest() | ||||
▲ Show 20 Lines • Show All 111 Lines • Show Last 20 Lines |