Page MenuHomeSoftware Heritage

Jenkins > .tox.py3.lib.python3.7.site-packages.swh.web.tests.browse.views.test_origin::Tests / Python tests / test_browse_origin_content_no_visit
Failed

TEST RESULT

Run At
Oct 7 2021, 12:13 PM
Details
client = <django.test.client.Client object at 0x7f6615e65470> mocker = <pytest_mock.plugin.MockerFixture object at 0x7f6615e65518> @given(origin()) > def test_browse_origin_content_no_visit(client, mocker, origin): .tox/py3/lib/python3.7/site-packages/swh/web/tests/browse/views/test_origin.py:583: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ .tox/py3/lib/python3.7/site-packages/swh/web/tests/browse/views/test_origin.py:596: in test_browse_origin_content_no_visit client, url, status_code=404, template_used="error.html" .tox/py3/lib/python3.7/site-packages/swh/web/tests/utils.py:207: in check_html_get_response client, url, status_code, content_type="text/html" .tox/py3/lib/python3.7/site-packages/swh/web/tests/utils.py:68: in check_http_get_response content_type=content_type, _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ response = <HttpResponse status_code=500, "text/html; charset=utf-8"> status_code = 404, content_type = 'text/html' def _assert_http_response( response: HttpResponse, status_code: int, content_type: str ) -> HttpResponse: 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) else: 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/swh/web/browse/views/origin.py", line 19, in get_snapshot_or_raise E snapshot_context = get_snapshot_context(**snapshot_params) E File "/var/lib/jenkins/workspace/DWAPPS/tests-on-diff/.tox/py3/lib/python3.7/site-packages/swh/web/browse/snapshot_context.py", line 450, in get_snapshot_context E visit_info = get_origin_visit(origin_info, timestamp, visit_id, snapshot_id) E File "/var/lib/jenkins/workspace/DWAPPS/tests-on-diff/.tox/py3/lib/python3.7/site-packages/swh/web/common/origin_visits.py", line 129, in get_origin_visit E f"No valid visit for origin with url {origin_info['url']} found!" E swh.web.common.exc.NotFoundExc: No valid visit for origin with url https://github.com/memononen/libtess2 found! E E During handling of the above exception, another exception occurred: E E Traceback (most recent call last): E File "/var/lib/jenkins/workspace/DWAPPS/tests-on-diff/.tox/py3/lib/python3.7/site-packages/django/core/handlers/base.py", line 113, in _get_response E response = wrapped_callback(request, *callback_args, **callback_kwargs) E File "/var/lib/jenkins/workspace/DWAPPS/tests-on-diff/.tox/py3/lib/python3.7/site-packages/swh/web/browse/views/origin.py", line 107, in origin_content_browse E "timestamp": request.GET.get("timestamp"), E File "/var/lib/jenkins/workspace/DWAPPS/tests-on-diff/.tox/py3/lib/python3.7/site-packages/swh/web/browse/views/origin.py", line 21, in get_snapshot_or_raise E raise Http404("Requested snapshot does not exist", str(e)) E django.http.response.Http404: ('Requested snapshot does not exist', 'No valid visit for origin with url https://github.com/memononen/libtess2 found!') E E assert 500 == 404 E +500 E -404 .tox/py3/lib/python3.7/site-packages/swh/web/tests/utils.py:34: AssertionError