Page Menu
Home
Software Heritage
Search
Configure Global Search
Log In
Files
F9348173
D6803.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Subscribers
None
D6803.diff
View Options
diff --git a/swh/loader/package/nixguix/tests/test_nixguix.py b/swh/loader/package/nixguix/tests/test_nixguix.py
--- a/swh/loader/package/nixguix/tests/test_nixguix.py
+++ b/swh/loader/package/nixguix/tests/test_nixguix.py
@@ -277,27 +277,17 @@
def test_loader_one_visit(swh_storage, requests_mock_datadir, raw_sources):
loader = NixGuixLoader(swh_storage, sources_url)
load_status = loader.load()
- expected_snapshot_id_hex = "efe5145f85af3fc87f34102d8b8481cd5198f4f8"
- expected_snapshot_id = hash_to_bytes(expected_snapshot_id_hex)
+ expected_snapshot_id = SNAPSHOT1.id
+ expected_snapshot_id_hex = expected_snapshot_id.hex()
assert load_status == {
"status": "eventful",
"snapshot_id": expected_snapshot_id_hex,
}
- release_id = hash_to_bytes("df7811b9644ed8ef088e2e7add62ed32b0bab15f")
- expected_snapshot = Snapshot(
- id=expected_snapshot_id,
- branches={
- b"evaluation": SnapshotBranch(
- target=hash_to_bytes("cc4e04c26672dd74e5fd0fecb78b435fb55368f7"),
- target_type=TargetType.REVISION,
- ),
- b"https://github.com/owner-1/repository-1/revision-1.tgz": SnapshotBranch(
- target=release_id, target_type=TargetType.RELEASE,
- ),
- },
- )
- check_snapshot(expected_snapshot, storage=swh_storage)
+ release_id = SNAPSHOT1.branches[
+ b"https://github.com/owner-1/repository-1/revision-1.tgz"
+ ].target
+ check_snapshot(SNAPSHOT1, storage=swh_storage)
assert swh_storage.release_get([release_id])[0] == Release(
id=release_id,
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Jul 3 2025, 6:15 PM (4 w, 5 d ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3223839
Attached To
D6803: nixguix: Deduplicate test data
Event Timeline
Log In to Comment