Changeset View
Changeset View
Standalone View
Standalone View
swh/storage/tests/algos/test_origin.py
Show First 20 Lines • Show All 303 Lines • ▼ Show 20 Lines | def test_origin_get_latest_visit_status_filter_snapshot(swh_storage): | ||||
# Requiring the latest visit with a snapshot, we still find the previous visit | # Requiring the latest visit with a snapshot, we still find the previous visit | ||||
ov2, ovs22 = origin_get_latest_visit_status( | ov2, ovs22 = origin_get_latest_visit_status( | ||||
swh_storage, origin2.url, require_snapshot=True | swh_storage, origin2.url, require_snapshot=True | ||||
) | ) | ||||
assert actual_ov2.origin == ov2.origin | assert actual_ov2.origin == ov2.origin | ||||
assert actual_ov2.visit == ov2.visit | assert actual_ov2.visit == ov2.visit | ||||
assert actual_ov2.type == ov2.type | assert actual_ov2.type == ov2.type | ||||
assert actual_ovs22 == ovs22 | assert actual_ovs22 == ovs22 | ||||
# Last visit has no snapshot so only looking back with a limit of 1 visit, we don't | |||||
# find anything | |||||
visit_and_status = origin_get_latest_visit_status( | |||||
ardumont: Should be None. | |||||
swh_storage, origin2.url, require_snapshot=True, limit=1 | |||||
) | |||||
assert visit_and_status is None |
Should be None.