client = <django.test.client.Client object at 0x7f87af596c50>
archive_data = <swh.web.tests.conftest._ArchiveData object at 0x7f87b0e89f28>
@given(origin_with_multiple_visits())
> def test_origin_content_view(client, archive_data, origin):
.tox/py3/lib/python3.7/site-packages/swh/web/tests/browse/views/test_origin.py:69:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.tox/py3/lib/python3.7/site-packages/swh/web/tests/browse/views/test_origin.py:100: in test_origin_content_view
tdata["content"],
.tox/py3/lib/python3.7/site-packages/swh/web/tests/browse/views/test_origin.py:889: in _origin_content_view_test_helper
client, url, status_code=200, template_used="browse/content.html"
.tox/py3/lib/python3.7/site-packages/swh/web/tests/utils.py:205: 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:66: 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: 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 81, in origin_content_browse
E selected_language=request.GET.get("language"),
E File "/var/lib/jenkins/workspace/DWAPPS/tests-on-diff/.tox/py3/lib/python3.7/site-packages/swh/web/browse/snapshot_context.py", line 919, in browse_snapshot_content
E revision_id=request.GET.get("revision"),
E File "/var/lib/jenkins/workspace/DWAPPS/tests-on-diff/.tox/py3/lib/python3.7/site-packages/swh/web/browse/snapshot_context.py", line 474, in get_snapshot_context
E 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/browse/snapshot_context.py", line 398, in get_origin_visit_snapshot
E return get_snapshot_content(visit_info["snapshot"])
E File "/var/lib/jenkins/workspace/DWAPPS/tests-on-diff/.tox/py3/lib/python3.7/site-packages/swh/web/browse/snapshot_context.py", line 343, in get_snapshot_content
E snapshot_id, branches_count=snapshot_content_max_size
E File "/var/lib/jenkins/workspace/DWAPPS/tests-on-diff/.tox/py3/lib/python3.7/site-packages/swh/web/common/archive.py", line 1088, in lookup_snapshot
E branch_name_exclude_prefix.encode() if branch_name_exclude_prefix else None,
E TypeError: snapshot_get_branches() takes from 2 to 5 positional arguments but 7 were given
E
E assert 500 == 200
E +500
E -200
.tox/py3/lib/python3.7/site-packages/swh/web/tests/utils.py:32: AssertionError
TEST RESULT
TEST RESULT
- Run At
- Mar 10 2021, 11:39 AM