Changeset View
Changeset View
Standalone View
Standalone View
swh/storage/tests/migrate_extrinsic_metadata/test_pypi.py
# Copyright (C) 2020 The Software Heritage developers | # Copyright (C) 2020 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 | ||||
# flake8: noqa | # flake8: noqa | ||||
# because of long lines | # because of long lines | ||||
import copy | import copy | ||||
import datetime | import datetime | ||||
import json | import json | ||||
import urllib.error | import urllib.error | ||||
import attr | import attr | ||||
from swh.model.identifiers import CoreSWHID, ExtendedObjectType, ExtendedSWHID | |||||
from swh.model.model import ( | from swh.model.model import ( | ||||
MetadataAuthority, | MetadataAuthority, | ||||
MetadataAuthorityType, | MetadataAuthorityType, | ||||
MetadataFetcher, | MetadataFetcher, | ||||
Origin, | Origin, | ||||
OriginVisit, | OriginVisit, | ||||
OriginVisitStatus, | OriginVisitStatus, | ||||
RawExtrinsicMetadata, | RawExtrinsicMetadata, | ||||
Snapshot, | Snapshot, | ||||
SnapshotBranch, | SnapshotBranch, | ||||
TargetType, | TargetType, | ||||
) | ) | ||||
from swh.model.swhids import CoreSWHID, ExtendedObjectType, ExtendedSWHID | |||||
from swh.storage import get_storage | from swh.storage import get_storage | ||||
from swh.storage.interface import PagedResult | from swh.storage.interface import PagedResult | ||||
from swh.storage.migrate_extrinsic_metadata import ( | from swh.storage.migrate_extrinsic_metadata import ( | ||||
handle_row, | handle_row, | ||||
pypi_origin_from_filename, | pypi_origin_from_filename, | ||||
pypi_project_from_filename, | pypi_project_from_filename, | ||||
) | ) | ||||
▲ Show 20 Lines • Show All 617 Lines • Show Last 20 Lines |