self = <swh.search.tests.test_in_memory.InmemorySearchTest testMethod=test_origin_update_with_no_visit_types>
def test_origin_update_with_no_visit_types(self):
"""
Update an origin with visit types first then with no visit types,
check origin can still be searched with visit types afterwards.
"""
origin_url = "http://foobar.baz"
self.search.origin_update([{"url": origin_url, "visit_types": ["git"]}])
self.search.flush()
self.search.origin_update([{"url": origin_url}])
self.search.flush()
actual_page = self.search.origin_search(url_pattern="http", visit_types=["git"])
assert actual_page.next_page_token is None
results = [r["url"] for r in actual_page.results]
expected_results = [origin_url]
> assert results == 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:464: AssertionError
TEST RESULT
TEST RESULT
- Run At
- Jun 23 2021, 6:04 PM