Page MenuHomeSoftware Heritage

Jenkins > .tox.py3.lib.python3.7.site-packages.swh.search.tests.test_in_memory.InmemorySearchTest::test_journal_client_origin_visit_status_permutation
Failed

TEST RESULT

Run At
Jun 23 2021, 6:04 PM
Details
self = <swh.search.tests.test_in_memory.InmemorySearchTest testMethod=test_journal_client_origin_visit_status_permutation> def test_journal_client_origin_visit_status_permutation(self): NOW = datetime.now(tz=timezone.utc).isoformat() NOW_MINUS_5_HOURS = ( datetime.now(tz=timezone.utc) - timedelta(hours=5) ).isoformat() NOW_PLUS_5_HOURS = ( datetime.now(tz=timezone.utc) + timedelta(hours=5) ).isoformat() VISIT_STATUSES = [ { "url": "http://foobar.baz", "snapshot_id": "SNAPSHOT_1", "last_eventful_visit_date": NOW, }, { "url": "http://foobar.baz", "snapshot_id": "SNAPSHOT_1", "last_eventful_visit_date": NOW_MINUS_5_HOURS, }, { "url": "http://foobar.baz", "snapshot_id": "SNAPSHOT_2", "last_eventful_visit_date": NOW_PLUS_5_HOURS, }, ] for visit_statuses in permutations(VISIT_STATUSES, len(VISIT_STATUSES)): self.search.origin_update(visit_statuses) self.search.flush() origin_url = "http://foobar.baz" actual_page = self.search.origin_search( url_pattern=origin_url, min_last_eventful_visit_date=NOW_PLUS_5_HOURS, ) assert actual_page.next_page_token is None results = [r["url"] for r in actual_page.results] expected_results = [origin_url] > assert sorted(results) == sorted(expected_results) E AssertionError: assert [] == ['http://foobar.baz'] E Right contains one more item: 'http://foobar.baz' E Full diff: E - ['http://foobar.baz'] E + [] .tox/py3/lib/python3.7/site-packages/swh/search/tests/test_search.py:299: AssertionError