swh_storage = <swh.storage.in_memory.InMemoryStorage object at 0x7f570bb61470>
sample_data = <swh.storage.tests.storage_data.StorageData object at 0x7f570bb7bf60>
def test_snapshot_get_latest_none(swh_storage, sample_data):
"""Retrieve latest snapshot on unknown origin or origin without snapshot should
yield no result
"""
# unknown origin so None
assert snapshot_get_latest(swh_storage, "unknown-origin") is None
# no snapshot on origin visit so None
origin = sample_data.origin
swh_storage.origin_add([origin])
origin_visit, origin_visit2 = sample_data.origin_visits[:2]
assert origin_visit.origin == origin.url
swh_storage.origin_visit_add([origin_visit])
assert snapshot_get_latest(swh_storage, origin.url) is None
ov1 = swh_storage.origin_visit_get_latest(origin.url)
> assert ov1 is not None
E assert None is not None
.tox/py3/lib/python3.7/site-packages/swh/storage/tests/algos/test_snapshot.py:76: AssertionError
TEST RESULT
TEST RESULT
- Run At
- Jul 6 2022, 4:23 PM