Changeset View
Changeset View
Standalone View
Standalone View
swh/web/tests/common/test_identifiers.py
# Copyright (C) 2020-2021 The Software Heritage developers | # Copyright (C) 2020-2021 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 Affero General Public License version 3, or any later version | # License: GNU Affero 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 random | import random | ||||
from urllib.parse import quote | from urllib.parse import quote | ||||
from hypothesis import given | from hypothesis import given | ||||
import pytest | import pytest | ||||
from swh.model.hashutil import hash_to_bytes | from swh.model.hashutil import hash_to_bytes | ||||
from swh.model.identifiers import ObjectType, QualifiedSWHID | |||||
from swh.model.model import Origin | from swh.model.model import Origin | ||||
from swh.model.swhids import ObjectType, QualifiedSWHID | |||||
from swh.web.browse.snapshot_context import get_snapshot_context | from swh.web.browse.snapshot_context import get_snapshot_context | ||||
from swh.web.common.exc import BadInputExc | from swh.web.common.exc import BadInputExc | ||||
from swh.web.common.identifiers import ( | from swh.web.common.identifiers import ( | ||||
gen_swhid, | gen_swhid, | ||||
get_swhid, | get_swhid, | ||||
get_swhids_info, | get_swhids_info, | ||||
group_swhids, | group_swhids, | ||||
parse_object_type, | parse_object_type, | ||||
▲ Show 20 Lines • Show All 747 Lines • Show Last 20 Lines |