Changeset View
Changeset View
Standalone View
Standalone View
swh/loader/package/npm/tests/test_npm.py
Show First 20 Lines • Show All 457 Lines • ▼ Show 20 Lines | assert { | ||||
"origin_visit": 1, | "origin_visit": 1, | ||||
"person": 2, | "person": 2, | ||||
"release": 0, | "release": 0, | ||||
"revision": len(_expected_new_revisions_first_visit), | "revision": len(_expected_new_revisions_first_visit), | ||||
"skipped_content": 0, | "skipped_content": 0, | ||||
"snapshot": 1, | "snapshot": 1, | ||||
} == stats | } == stats | ||||
loader._info = None # reset loader internal state | # reset loader internal state | ||||
del loader._cached_info | |||||
del loader._cached__raw_info | |||||
actual_load_status2 = loader.load() | actual_load_status2 = loader.load() | ||||
assert actual_load_status2["status"] == "eventful" | assert actual_load_status2["status"] == "eventful" | ||||
snap_id2 = actual_load_status2["snapshot_id"] | snap_id2 = actual_load_status2["snapshot_id"] | ||||
assert snap_id2 is not None | assert snap_id2 is not None | ||||
assert snap_id2 != actual_load_status["snapshot_id"] | assert snap_id2 != actual_load_status["snapshot_id"] | ||||
assert_last_visit_matches(loader.storage, url, status="full", type="npm") | assert_last_visit_matches(loader.storage, url, status="full", type="npm") | ||||
▲ Show 20 Lines • Show All 231 Lines • Show Last 20 Lines |