client = <django.test.client.Client object at 0x7f6616c73470>
archive_data = <swh.web.tests.conftest._ArchiveData object at 0x7f6616c73518>
mocker = <pytest_mock.plugin.MockerFixture object at 0x7f6616c73588>
@given(
> new_origin(), visit_dates(), revisions(min_size=10, max_size=10), existing_release()
)
def test_origin_branches_pagination_with_alias(
client, archive_data, mocker, new_origin, visit_dates, revisions, existing_release
):
"""
When a snapshot contains a branch or a release alias, pagination links
in the branches / releases view should be displayed.
.tox/py3/lib/python3.7/site-packages/swh/web/tests/browse/views/test_origin.py:1248:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.tox/py3/lib/python3.7/site-packages/swh/web/tests/browse/views/test_origin.py:1291: in test_origin_branches_pagination_with_alias
client, url, status_code=200, template_used="browse/branches.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 = <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 242, in origin_branches_browse
E params=request.GET,
E File "/var/lib/jenkins/workspace/DWAPPS/tests-on-diff/.tox/py3/lib/python3.7/site-packages/swh/web/browse/views/origin.py", line 26, in deprecate_route
E return redirect(reverse(alternate_route, url_args=args, query_params=params))
E File "/var/lib/jenkins/workspace/DWAPPS/tests-on-diff/.tox/py3/lib/python3.7/site-packages/swh/web/common/utils.py", line 83, in reverse
E viewname, urlconf=urlconf, kwargs=url_args, current_app=current_app
E File "/var/lib/jenkins/workspace/DWAPPS/tests-on-diff/.tox/py3/lib/python3.7/site-packages/django/urls/base.py", line 90, in reverse
E return iri_to_uri(resolver._reverse_with_prefix(view, prefix, *args, **kwargs))
E File "/var/lib/jenkins/workspace/DWAPPS/tests-on-diff/.tox/py3/lib/python3.7/site-packages/django/urls/resolvers.py", line 673, in _reverse_with_prefix
E raise NoReverseMatch(msg)
E django.urls.exceptions.NoReverseMatch: Reverse for 'browse-snapshot-branches' with keyword arguments '{'sha1_git': '26cd2d8b4476171a39059a041c66057afc431492'}' not found. 1 pattern(s) tried: ['browse/snapshot/(?P<snapshot_id>[0-9a-f]+)/branches/$']
E
E assert 500 == 200
E +500
E -200
.tox/py3/lib/python3.7/site-packages/swh/web/tests/utils.py:34: AssertionError
TEST RESULT
TEST RESULT
- Run At
- Oct 7 2021, 12:13 PM