self = <swh.search.tests.test_in_memory.InmemorySearchTest testMethod=test_origin_url_unique_word_prefix_multiple_results>
def test_origin_url_unique_word_prefix_multiple_results(self):
origin_foobar_baz = {"url": "http://foobar.baz"}
origin_barbaz_qux = {"url": "http://barbaz.qux"}
origin_qux_quux = {"url": "http://qux.quux"}
self.search.origin_update(
[origin_foobar_baz, origin_barbaz_qux, origin_qux_quux]
)
self.search.flush()
actual_page = self.search.origin_search(url_pattern="qu")
assert actual_page.next_page_token is None
results = [r["url"] for r in actual_page.results]
expected_results = [o["url"] for o in [origin_qux_quux, origin_barbaz_qux]]
> assert sorted(results) == sorted(expected_results)
E AssertionError: assert [] == ['http://barb...p://qux.quux']
E Right contains 2 more items, first extra item: 'http://barbaz.qux'
E Full diff:
E - ['http://barbaz.qux', 'http://qux.quux']
E + []
.tox/py3/lib/python3.7/site-packages/swh/search/tests/test_search.py:56: AssertionError
TEST RESULT
TEST RESULT
- Run At
- Jun 23 2021, 6:04 PM