Page MenuHomeSoftware Heritage

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

TEST RESULT

Run At
Oct 7 2021, 11:07 AM
Details
client = <django.test.client.Client object at 0x7efd5f078128> @given(origin()) > def test_browse_origin_directory_not_found(client, origin): .tox/py3/lib/python3.7/site-packages/swh/web/tests/browse/views/test_origin.py:570: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ .tox/py3/lib/python3.7/site-packages/swh/web/tests/browse/views/test_origin.py:577: in test_browse_origin_directory_not_found client, url, status_code=404, template_used="browse/directory.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 = <HttpResponseRedirect status_code=302, "text/html; charset=utf-8", url="/browse/directory/2a9e0d6dee8dc7c87c22fd56731ab5c732282eab/?origin_url=https://github.com/memononen/libtess2&path=/invalid/dir/path/"> 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: b'' E assert 302 == 404 E +302 E -404 .tox/py3/lib/python3.7/site-packages/swh/web/tests/utils.py:34: AssertionError