Page MenuHomeSoftware Heritage

Jenkins > .tox.py3.lib.python3.7.site-packages.swh.web.tests.api.views.test_content::Tests / Python tests / test_api_content_symbol_not_found
Failed

TEST RESULT

Run At
Aug 4 2022, 10:41 AM
Details
api_client = <rest_framework.test.APIClient object at 0x7fcfab65dc88> def test_api_content_symbol_not_found(api_client): url = reverse("api-1-content-symbol", url_args={"q": "bar"}) > rv = check_api_get_responses(api_client, url, status_code=404) .tox/py3/lib/python3.7/site-packages/swh/web/tests/api/views/test_content.py:124: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ .tox/py3/lib/python3.7/site-packages/swh/web/tests/utils.py:123: in check_api_get_responses api_client, url, status_code, content_type="application/json" .tox/py3/lib/python3.7/site-packages/swh/web/tests/utils.py:68: in check_http_get_response content_type=content_type, _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ response = <Response status_code=500, "application/json">, status_code = 404 content_type = 'application/json' def _assert_http_response( response: HttpResponseBase, status_code: int, content_type: str ) -> HttpResponseBase: if isinstance(response, Response): drf_response = cast(Response, response) error_context = ( drf_response.data.pop("traceback") if isinstance(drf_response.data, dict) and "traceback" in drf_response.data else drf_response.data ) elif isinstance(response, StreamingHttpResponse): error_context = getattr(response, "traceback", response.streaming_content) elif isinstance(response, HttpResponse): error_context = getattr(response, "traceback", response.content) > assert response.status_code == status_code, error_context E AssertionError: Traceback (most recent call last): E File "/var/lib/jenkins/workspace/DWAPPS/tests-on-diff/.tox/py3/lib/python3.7/site-packages/rest_framework/views.py", line 506, in dispatch E response = handler(request, *args, **kwargs) E File "/var/lib/jenkins/workspace/DWAPPS/tests-on-diff/.tox/py3/lib/python3.7/site-packages/rest_framework/decorators.py", line 50, in handler E return func(*args, **kwargs) E File "/var/lib/jenkins/workspace/DWAPPS/tests-on-diff/.tox/py3/lib/python3.7/site-packages/swh/web/api/apiurls.py", line 96, in api_view_f E response = f(request, **kwargs) E File "/var/lib/jenkins/workspace/DWAPPS/tests-on-diff/.tox/py3/lib/python3.7/site-packages/swh/web/api/apidoc.py", line 380, in documented_view E raise exc E File "/var/lib/jenkins/workspace/DWAPPS/tests-on-diff/.tox/py3/lib/python3.7/site-packages/swh/web/api/apidoc.py", line 377, in documented_view E return {"data": f(request, **kwargs), "doc_data": doc_data} E File "/var/lib/jenkins/workspace/DWAPPS/tests-on-diff/.tox/py3/lib/python3.7/site-packages/swh/web/api/views/content.py", line 256, in api_content_symbol E request=request, E File "/var/lib/jenkins/workspace/DWAPPS/tests-on-diff/.tox/py3/lib/python3.7/site-packages/swh/web/api/views/utils.py", line 67, in api_lookup E res = lookup_fn(*args, **kwargs) E File "/var/lib/jenkins/workspace/DWAPPS/tests-on-diff/.tox/py3/lib/python3.7/site-packages/swh/web/api/views/content.py", line 248, in lookup_exp E exp = list(archive.lookup_expression(exp, last_sha1, per_page)) E File "/var/lib/jenkins/workspace/DWAPPS/tests-on-diff/.tox/py3/lib/python3.7/site-packages/swh/web/common/archive.py", line 85, in lookup_expression E ctags = idx_storage.content_ctags_search( E AttributeError: 'IndexerStorage' object has no attribute 'content_ctags_search' E E assert 500 == 404 E + where 500 = <Response status_code=500, "application/json">.status_code .tox/py3/lib/python3.7/site-packages/swh/web/tests/utils.py:34: AssertionError