Changeset View
Changeset View
Standalone View
Standalone View
swh/loader/package/nixguix/tests/test_nixguix.py
Show All 16 Lines | |||||
from swh.model.model import Snapshot | from swh.model.model import Snapshot | ||||
from swh.loader.package.archive.loader import ArchiveLoader | from swh.loader.package.archive.loader import ArchiveLoader | ||||
from swh.loader.package.nixguix.loader import ( | from swh.loader.package.nixguix.loader import ( | ||||
NixGuixLoader, | NixGuixLoader, | ||||
retrieve_sources, | retrieve_sources, | ||||
clean_sources, | clean_sources, | ||||
) | ) | ||||
from swh.loader.package.tests.common import ( | |||||
get_stats, | |||||
check_snapshot, | |||||
) | |||||
from swh.loader.package.utils import download | from swh.loader.package.utils import download | ||||
from swh.model.hashutil import hash_to_bytes, hash_to_hex | from swh.model.hashutil import hash_to_bytes, hash_to_hex | ||||
from swh.storage.exc import HashCollision | from swh.storage.exc import HashCollision | ||||
from swh.loader.tests import assert_last_visit_matches | |||||
from swh.loader.tests import ( | |||||
assert_last_visit_matches, | |||||
get_stats, | |||||
check_snapshot, | |||||
) | |||||
sources_url = "https://nix-community.github.io/nixpkgs-swh/sources.json" | sources_url = "https://nix-community.github.io/nixpkgs-swh/sources.json" | ||||
def test_retrieve_sources(swh_config, requests_mock_datadir): | def test_retrieve_sources(swh_config, requests_mock_datadir): | ||||
j = retrieve_sources(sources_url) | j = retrieve_sources(sources_url) | ||||
assert "sources" in j.keys() | assert "sources" in j.keys() | ||||
▲ Show 20 Lines • Show All 514 Lines • Show Last 20 Lines |