self = <swh.search.tests.test_in_memory.InmemorySearchTest testMethod=test_origin_intrinsic_metadata_all_terms>
def test_origin_intrinsic_metadata_all_terms(self):
origin1_foobarfoobar = {"url": "http://origin1"}
origin3_foobarbaz = {"url": "http://origin2"}
self.search.origin_update(
[
{
**origin1_foobarfoobar,
"intrinsic_metadata": {
"@context": "https://doi.org/10.5063/schema/codemeta-2.0",
"description": "foo bar foo bar",
},
},
{
**origin3_foobarbaz,
"intrinsic_metadata": {
"@context": "https://doi.org/10.5063/schema/codemeta-2.0",
"description": "foo bar baz",
},
},
]
)
self.search.flush()
actual_page = self.search.origin_search(metadata_pattern="foo bar baz")
assert actual_page.next_page_token is None
> assert actual_page.results == [origin3_foobarbaz]
E AssertionError: assert [] == [{'url': 'http://origin2'}]
E Right contains one more item: {'url': 'http://origin2'}
E Full diff:
E - [{'url': 'http://origin2'}]
E + []
.tox/py3/lib/python3.7/site-packages/swh/search/tests/test_search.py:530: AssertionError
TEST RESULT
TEST RESULT
- Run At
- Jun 23 2021, 6:04 PM