Changeset View
Changeset View
Standalone View
Standalone View
swh/loader/package/nixguix/tests/test_nixguix.py
Show First 20 Lines • Show All 93 Lines • ▼ Show 20 Lines | def check_snapshot(snapshot: Snapshot, storage: StorageInterface): | ||||
for name, branch in snapshot.branches.items(): | for name, branch in snapshot.branches.items(): | ||||
if name == b"evaluation": | if name == b"evaluation": | ||||
continue # skipping that particular branch (cf. previous comment) | continue # skipping that particular branch (cf. previous comment) | ||||
if branch.target_type == TargetType.REVISION: | if branch.target_type == TargetType.REVISION: | ||||
revision_ids.append(branch.target) | revision_ids.append(branch.target) | ||||
revisions = storage.revision_get(revision_ids) | revisions = storage.revision_get(revision_ids) | ||||
for rev in revisions: | for rev in revisions: | ||||
assert rev is not None | |||||
metadata = rev["metadata"] | metadata = rev["metadata"] | ||||
raw = metadata["extrinsic"]["raw"] | raw = metadata["extrinsic"]["raw"] | ||||
assert "url" in raw | assert "url" in raw | ||||
assert "integrity" in raw | assert "integrity" in raw | ||||
def test_retrieve_sources(swh_config, requests_mock_datadir): | def test_retrieve_sources(swh_config, requests_mock_datadir): | ||||
j = parse_sources(retrieve_sources(sources_url)) | j = parse_sources(retrieve_sources(sources_url)) | ||||
▲ Show 20 Lines • Show All 482 Lines • Show Last 20 Lines |