Changeset View
Changeset View
Standalone View
Standalone View
swh/loader/package/pypi/tests/test_pypi.py
Show All 16 Lines | from swh.loader.package.pypi.loader import ( | ||||
PyPILoader, | PyPILoader, | ||||
PyPIPackageInfo, | PyPIPackageInfo, | ||||
author, | author, | ||||
extract_intrinsic_metadata, | extract_intrinsic_metadata, | ||||
pypi_api_url, | pypi_api_url, | ||||
) | ) | ||||
from swh.loader.tests import assert_last_visit_matches, check_snapshot, get_stats | from swh.loader.tests import assert_last_visit_matches, check_snapshot, get_stats | ||||
from swh.model.hashutil import hash_to_bytes | from swh.model.hashutil import hash_to_bytes | ||||
from swh.model.identifiers import ( | |||||
CoreSWHID, | |||||
ExtendedObjectType, | |||||
ExtendedSWHID, | |||||
ObjectType, | |||||
) | |||||
from swh.model.model import ( | from swh.model.model import ( | ||||
MetadataAuthority, | MetadataAuthority, | ||||
MetadataAuthorityType, | MetadataAuthorityType, | ||||
MetadataFetcher, | MetadataFetcher, | ||||
Person, | Person, | ||||
RawExtrinsicMetadata, | RawExtrinsicMetadata, | ||||
Snapshot, | Snapshot, | ||||
SnapshotBranch, | SnapshotBranch, | ||||
TargetType, | TargetType, | ||||
) | ) | ||||
from swh.model.swhids import CoreSWHID, ExtendedObjectType, ExtendedSWHID, ObjectType | |||||
from swh.storage.interface import PagedResult | from swh.storage.interface import PagedResult | ||||
@pytest.fixture | @pytest.fixture | ||||
def _0805nexter_api_info(datadir) -> bytes: | def _0805nexter_api_info(datadir) -> bytes: | ||||
with open( | with open( | ||||
os.path.join(datadir, "https_pypi.org", "pypi_0805nexter_json"), "rb", | os.path.join(datadir, "https_pypi.org", "pypi_0805nexter_json"), "rb", | ||||
) as f: | ) as f: | ||||
▲ Show 20 Lines • Show All 839 Lines • Show Last 20 Lines |