Page MenuHomeSoftware Heritage

Jenkins > .tox.py3.lib.python3.7.site-packages.swh.search.tests.test_api_client.TestRemoteSearch::test_origin_last_visit_date_update_search
Failed

TEST RESULT

Run At
Jun 10 2021, 1:41 PM
Details
self = <swh.search.tests.test_api_client.TestRemoteSearch testMethod=test_origin_last_visit_date_update_search> def test_origin_last_visit_date_update_search(self): origin_url = "http://foobar.baz" self.search.origin_update([{"url": origin_url}]) self.search.flush() def _update_last_visit_date(last_visit_date): self.search.origin_update( [{"url": origin_url, "last_visit_date": last_visit_date}] ) self.search.flush() def _check_last_visit_date(last_visit_date): actual_page = self.search.origin_search( url_pattern=origin_url, last_visit_date=last_visit_date, ) 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) now = datetime.now(tz=timezone.utc).isoformat() now_minus_5_years = ( > datetime.now(tz=timezone.utc) - timedelta(years=5) ).isoformat() E TypeError: 'years' is an invalid keyword argument for __new__() .tox/py3/lib/python3.7/site-packages/swh/search/tests/test_search.py:239: TypeError