Page MenuHomeSoftware Heritage

Jenkins > .tox.py3.lib.python3.7.site-packages.swh.web.tests.jslicenses.test_jslicenses::Tests / Python tests / test_js_licenses
Failed

TEST RESULT

Run At
Aug 31 2022, 2:38 PM
Details
client = <django.test.client.Client object at 0x7fe68c7d1b70> def test_js_licenses(client): url = reverse("jslicenses") check_html_get_response( > client, url, status_code=200, template_used="jslicenses.html" ) .tox/py3/lib/python3.7/site-packages/swh/web/tests/jslicenses/test_jslicenses.py:13: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ .tox/py3/lib/python3.7/site-packages/swh/web/tests/helpers.py:222: in check_html_get_response server_name=server_name, .tox/py3/lib/python3.7/site-packages/swh/web/tests/helpers.py:68: in check_http_get_response content_type=content_type, _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ response = <HttpResponse status_code=500, "text/html; charset=utf-8"> status_code = 200, content_type = 'text/html' 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/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/jslicenses/urls.py", line 15, in jslicenses E jslicenses_data = json.load(open(jslicenses_file)) E TypeError: expected str, bytes or os.PathLike object, not NoneType E E assert 500 == 200 E + where 500 = <HttpResponse status_code=500, "text/html; charset=utf-8">.status_code .tox/py3/lib/python3.7/site-packages/swh/web/tests/helpers.py:34: AssertionError