Page MenuHomeSoftware Heritage

Jenkins > .tox.py3.lib.python3.7.site-packages.swh.search.tests.test_elasticsearch.TestElasticsearchSearch::test_origin_intrinsic_metadata_paging
Failed

TEST RESULT

Run At
Jul 31 2020, 12:13 PM
Details
self = <swh.search.tests.test_elasticsearch.TestElasticsearchSearch testMethod=test_origin_intrinsic_metadata_paging> @settings(deadline=None) > @given(strategies.integers(min_value=1, max_value=4)) def test_origin_intrinsic_metadata_paging(self, limit): .tox/py3/lib/python3.7/site-packages/swh/search/tests/test_search.py:248: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <swh.search.tests.test_elasticsearch.TestElasticsearchSearch testMethod=test_origin_intrinsic_metadata_paging> limit = 1 @settings(deadline=None) @given(strategies.integers(min_value=1, max_value=4)) def test_origin_intrinsic_metadata_paging(self, limit): # TODO: no hypothesis origin1_foo = {"url": "http://origin1/foo"} origin2_foobar = {"url": "http://origin2/foo/bar"} origin3_foobarbaz = {"url": "http://origin3/foo/bar/baz"} self.reset() self.search.origin_update( [ { **origin1_foo, "intrinsic_metadata": { "@context": "https://doi.org/10.5063/schema/codemeta-2.0", "keywords": ["foo"], }, }, { **origin2_foobar, "intrinsic_metadata": { "@context": "https://doi.org/10.5063/schema/codemeta-2.0", "keywords": ["foo", "bar"], }, }, { **origin3_foobarbaz, "intrinsic_metadata": { "@context": "https://doi.org/10.5063/schema/codemeta-2.0", "keywords": ["foo", "bar", "baz"], }, }, ] ) self.search.flush() results = stream_results( self.search.origin_search, metadata_pattern="foo bar baz", limit=limit ) assert list(results) == [origin3_foobarbaz] results = stream_results( self.search.origin_search, metadata_pattern="foo bar", limit=limit ) assert list(results) == [origin2_foobar, origin3_foobarbaz] results = stream_results( self.search.origin_search, metadata_pattern="foo", limit=limit ) > assert list(results) == [origin1_foo, origin2_foobar, origin3_foobarbaz] E AssertionError: assert [{'url': 'htt...in2/foo/bar'}] == [{'url': 'htt...foo/bar/baz'}] E At index 0 diff: {'url': 'http://origin3/foo/bar/baz'} != {'url': 'http://origin1/foo'} E Full diff: E [ E + {'url': 'http://origin3/foo/bar/baz'}, E {'url': 'http://origin1/foo'}, E {'url': 'http://origin2/foo/bar'}, E - {'url': 'http://origin3/foo/bar/baz'},... 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:296: AssertionError