archive_data = <swh.web.tests.conftest._ArchiveData object at 0x7f247bbc2c88>
@settings(max_examples=1)
> @given(new_origin(), visit_dates())
def test_origin_visit_find_latest_status_by_date_only_created(
archive_data, new_origin, visit_dates
):
.tox/py3/lib/python3.7/site-packages/swh/web/tests/common/test_archive.py:229:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
archive_data = <swh.web.tests.conftest._ArchiveData object at 0x7f247bbc2c88>
new_origin = Origin(url='git://a.0', id=b'\x17\x9e\x80\xa4\x8fda\x8e{\xa0\xa9\x14\x82F8\xab\x05\xaa\x95\xbb')
visit_dates = [datetime.datetime(2015, 1, 1, 0, 0, tzinfo=tzutc()), datetime.datetime(2015, 1, 1, 4, 7, 9, 726824, tzinfo=tzfile('/usr/share/zoneinfo/America/Argentina/Buenos_Aires'))]
@settings(max_examples=1)
@given(new_origin(), visit_dates())
def test_origin_visit_find_latest_status_by_date_only_created(
archive_data, new_origin, visit_dates
):
"""Only created visits in storage for an origin should return those most recent"""
archive_data.origin_add([new_origin])
# Adding some visits
visits = archive_data.origin_visit_add(
[
OriginVisit(origin=new_origin.url, date=ts, type="git",)
for ts in sorted(visit_dates)
]
)
last_visit = max(visits, key=lambda v: v.date)
# We will only find reference to created status since we have no other statuses
actual_origin_visit_status = archive.origin_visit_find_latest_status_by_date(
new_origin.url, last_visit.date
)
> assert actual_origin_visit_status is not None
E assert None is not None
.tox/py3/lib/python3.7/site-packages/swh/web/tests/common/test_archive.py:249: AssertionError
TEST RESULT
TEST RESULT
- Run At
- Feb 10 2022, 3:23 PM