client = <django.test.client.Client object at 0x7f87af7d45c0>
@given(snapshot())
> def test_snapshot_badge(client, snapshot):
.tox/py3/lib/python3.7/site-packages/swh/web/tests/misc/test_badges.py:60:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.tox/py3/lib/python3.7/site-packages/swh/web/tests/misc/test_badges.py:61: in test_snapshot_badge
_test_badge_endpoints(client, "snapshot", snapshot)
.tox/py3/lib/python3.7/site-packages/swh/web/tests/misc/test_badges.py:154: in _test_badge_endpoints
client, url, status_code=200, content_type="image/svg+xml"
.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 = 'image/svg+xml'
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/misc/badges.py", line 112, in _swh_badge
E swh_object = archive.lookup_object(object_type, object_id)
E File "/var/lib/jenkins/workspace/DWAPPS/tests-on-diff/.tox/py3/lib/python3.7/site-packages/swh/web/common/archive.py", line 1360, in lookup_object
E return lookup_snapshot(object_id)
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