api_client = <rest_framework.test.APIClient object at 0x7fabd81719e8>
mocker = <pytest_mock.plugin.MockFixture object at 0x7fabd933a748>
backend = 'swh-storage'
@pytest.mark.parametrize("backend", ["swh-search", "swh-storage"])
def test_api_origin_search_words(api_client, mocker, 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": 2},
)
rv = api_client.get(url)
> assert rv.status_code == 200, rv.data
E AssertionError: {'exception': 'TypeError', 'reason': "origin_search() got an unexpected keyword argument 'page_token'"}
E assert 500 == 200
E +500
E -200
.tox/py3/lib/python3.7/site-packages/swh/web/tests/api/views/test_origin.py:500: AssertionError
TEST RESULT
TEST RESULT
- Run At
- Jul 30 2020, 11:10 PM