Page MenuHomeSoftware Heritage

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

TEST RESULT

Run At
Oct 7 2021, 12:13 PM
Details
client = <django.test.client.Client object at 0x7f66167baa20> def test_origin_views_no_url_query_parameter(client): for browse_context in ( "content", "directory", "log", "branches", "releases", "visits", ): url = reverse(f"browse-origin-{browse_context}") resp = check_html_get_response( > client, url, status_code=400, template_used="error.html" ) .tox/py3/lib/python3.7/site-packages/swh/web/tests/browse/views/test_origin.py:865: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ .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 = 400, 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/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 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 434, in get_snapshot_context E assert origin_url is not None or snapshot_id is not None E AssertionError: assert (None is not None or None is not None) E E assert 500 == 400 E +500 E -400 .tox/py3/lib/python3.7/site-packages/swh/web/tests/utils.py:34: AssertionError