self = <swh.search.tests.test_api_client.TestRemoteSearch testMethod=test_origin_url_unique_word_prefix>
def test_origin_url_unique_word_prefix(self):
origin_foobar = Origin(url="http://foobar.baz")
origin_barbaz = Origin(url="http://barbaz.qux")
origin_quux = Origin(url="http://qux.quux")
origins = [origin_foobar, origin_barbaz, origin_quux]
self.search.origin_update([o.to_dict() for o in origins])
self.search.flush()
actual_page = self.search.origin_search(url_pattern="foobar")
assert actual_page.next_page_token is None
> assert actual_page.results == [origin_foobar]
E AssertionError: assert [{b'd': {'__t...pe': 'model'}] == [Origin(url='.../foobar.baz')]
E At index 0 diff: {b'swhtype': 'model', b'd': {'url': 'http://foobar.baz', '__type__': 'Origin'}} != Origin(url='http://foobar.baz')
E Full diff:
E [
E - Origin(url='http://foobar.baz'),
E + {b'd': {'__type__': 'Origin',
E + 'url': 'http://foobar.baz'},
E + b'swhtype': 'model'},...
E
E ...Full output truncated (2 lines hidden), use '-vv' to show
.tox/py3/lib/python3.7/site-packages/swh/search/tests/test_search.py:25: AssertionError
TEST RESULT
TEST RESULT
- Run At
- Jul 30 2020, 7:36 PM