Page MenuHomeSoftware Heritage

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

TEST RESULT

Run At
Oct 7 2021, 12:13 PM
Details
client = <django.test.client.Client object at 0x7f6617432ba8> archive_data = <swh.web.tests.conftest._ArchiveData object at 0x7f66174329b0> @given( > new_origin(), new_snapshot(min_size=4, max_size=4), visit_dates(), revisions(min_size=4, max_size=4), ) def test_origin_snapshot_invalid_branch( client, archive_data, new_origin, new_snapshot, visit_dates, revisions ): .tox/py3/lib/python3.7/site-packages/swh/web/tests/browse/views/test_origin.py:484: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ .tox/py3/lib/python3.7/site-packages/swh/web/tests/browse/views/test_origin.py:518: in test_origin_snapshot_invalid_branch check_html_get_response(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 = <HttpResponseRedirect status_code=302, "text/html; charset=utf-8", url="/browse/directory/26cd2d8b4476171a39059a041c66057afc431492/?branch=invalid_branch&origin_url=git://a.0"> 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