Page MenuHomeSoftware Heritage

Jenkins > .tox.py3.lib.python3.7.site-packages.swh.web.tests.api.views.test_origin::Tests / Python tests / test_api_origin_search_scroll[1-swh-search]
Failed

TEST RESULT

Run At
Jul 30 2020, 11:10 PM
Details
api_client = <rest_framework.test.APIClient object at 0x7fabd81719e8> archive_data = <swh.web.tests.conftest._ArchiveData object at 0x7fabd936c320> mocker = <pytest_mock.plugin.MockFixture object at 0x7fabd815a8d0>, limit = 1 backend = 'swh-search' @pytest.mark.parametrize("backend", ["swh-search", "swh-storage"]) @pytest.mark.parametrize("limit", [1, 2, 3, 10]) def test_api_origin_search_scroll(api_client, archive_data, mocker, limit, backend): if backend != "swh-search": # equivalent to not configuring search in the config mocker.patch("swh.web.common.service.search", None) expected_origins = { "https://github.com/wcoder/highlightjs-line-numbers.js", "https://github.com/memononen/libtess2", } url = reverse( "api-1-origin-search", url_args={"url_pattern": "github.com"}, query_params={"limit": limit}, ) > results = _scroll_results(api_client, url) .tox/py3/lib/python3.7/site-packages/swh/web/tests/api/views/test_origin.py:560: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ api_client = <rest_framework.test.APIClient object at 0x7fabd81719e8> url = '/api/1/origin/search/github.com/?limit=1' def _scroll_results(api_client, url): """Iterates through pages of results, and returns them all.""" results = [] while True: rv = api_client.get(url) > assert rv.status_code == 200, rv.data E AssertionError: {'exception': 'TypeError', 'reason': "origin_search() got an unexpected keyword argument 'limit'"} E assert 500 == 200 E +500 E -200 .tox/py3/lib/python3.7/site-packages/swh/web/tests/api/views/test_origin.py:30: AssertionError