Page MenuHomeSoftware Heritage

D2270.id.diff
No OneTemporary

D2270.id.diff

diff --git a/swh/loader/package/debian.py b/swh/loader/package/debian.py
--- a/swh/loader/package/debian.py
+++ b/swh/loader/package/debian.py
@@ -29,7 +29,7 @@
"""Load debian origins into swh archive.
"""
- visit_type = 'debian'
+ visit_type = 'deb'
def __init__(self, url: str, date: str, packages: Mapping[str, Any]):
"""Debian Loader implementation.
diff --git a/swh/loader/package/tests/test_debian.py b/swh/loader/package/tests/test_debian.py
--- a/swh/loader/package/tests/test_debian.py
+++ b/swh/loader/package/tests/test_debian.py
@@ -139,6 +139,7 @@
assert actual_load_status['status'] == 'eventful'
origin_visit = next(loader.storage.origin_visit_get(url))
assert origin_visit['status'] == 'full'
+ assert origin_visit['type'] == 'deb'
stats = get_stats(loader.storage)
assert {
@@ -170,6 +171,7 @@
assert actual_load_status2['status'] == 'uneventful'
origin_visit2 = list(loader.storage.origin_visit_get(url))
assert origin_visit2[-1]['status'] == 'full'
+ assert origin_visit2[-1]['type'] == 'deb'
stats2 = get_stats(loader.storage)
assert {
@@ -353,6 +355,7 @@
origin_visit = next(loader.storage.origin_visit_get(url))
assert origin_visit['status'] == 'full'
+ assert origin_visit['type'] == 'deb'
expected_snapshot = {
'id': 'defc19021187f3727293121fcf6c5c82cb923604',

File Metadata

Mime Type
text/plain
Expires
Thu, Jan 30, 1:44 PM (8 h, 39 m ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3215587

Event Timeline