client = <django.test.client.Client object at 0x7fdbe2b2ce10>
mocker = <pytest_mock.plugin.MockerFixture object at 0x7fdbe2b2cb70>
@given(origin())
> def test_browse_origin_content_directory_empty_snapshot(client, mocker, origin):
.tox/py3/lib/python3.7/site-packages/swh/web/tests/browse/views/test_origin.py:620:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.tox/py3/lib/python3.7/site-packages/swh/web/tests/browse/views/test_origin.py:640: in test_browse_origin_content_directory_empty_snapshot
client, url, status_code=200, template_used=f"browse/{browse_context}.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 1070, in browse_snapshot_content
E status=error_info["status_code"],
E File "/var/lib/jenkins/workspace/DWAPPS/tests-on-diff/.tox/py3/lib/python3.7/site-packages/django/shortcuts.py", line 36, in render
E content = loader.render_to_string(template_name, context, request, using=using)
E File "/var/lib/jenkins/workspace/DWAPPS/tests-on-diff/.tox/py3/lib/python3.7/site-packages/django/template/loader.py", line 62, in render_to_string
E return template.render(context, request)
E File "/var/lib/jenkins/workspace/DWAPPS/tests-on-diff/.tox/py3/lib/python3.7/site-packages/django/template/backends/django.py", line 61, in render
E return self.template.render(context)
E File "/var/lib/jenkins/workspace/DWAPPS/tests-on-diff/.tox/py3/lib/python3.7/site-packages/django/template/base.py", line 171, in render
E return self._render(context)
E File "/var/lib/jenkins/workspace/DWAPPS/tests-on-diff/.tox/py3/lib/python3.7/site-packages/django/test/utils.py", line 96, in instrumented_test_render
E return self.nodelist.render(context)
E File "/var/lib/jenkins/workspace/DWAPPS/tests-on-diff/.tox/py3/lib/python3.7/site-packages/django/template/base.py", line 937, in render
E bit = node.render_annotated(context)
E File "/var/lib/jenkins/workspace/DWAPPS/tests-on-diff/.tox/py3/lib/python3.7/site-packages/django/template/base.py", line 904, in render_annotated
E return self.render(context)
E File "/var/lib/jenkins/workspace/DWAPPS/tests-on-diff/.tox/py3/lib/python3.7/site-packages/django/template/loader_tags.py", line 150, in render
E return compiled_parent._render(context)
E File "/var/lib/jenkins/workspace/DWAPPS/tests-on-diff/.tox/py3/lib/python3.7/site-packages/django/test/utils.py", line 96, in instrumented_test_render
E return self.nodelist.render(context)
E File "/var/lib/jenkins/workspace/DWAPPS/tests-on-diff/.tox/py3/lib/python3.7/site-packages/django/template/base.py", line 937, in render
E bit = node.render_annotated(context)
E File "/var/lib/jenkins/workspace/DWAPPS/tests-on-diff/.tox/py3/lib/python3.7/site-packages/django/template/base.py", line 904, in render_annotated
E return self.render(context)
E File "/var/lib/jenkins/workspace/DWAPPS/tests-on-diff/.tox/py3/lib/python3.7/site-packages/django/template/loader_tags.py", line 150, in render
E return compiled_parent._render(context)
E File "/var/lib/jenkins/workspace/DWAPPS/tests-on-diff/.tox/py3/lib/python3.7/site-packages/django/test/utils.py", line 96, in instrumented_test_render
E return self.nodelist.render(context)
E File "/var/lib/jenkins/workspace/DWAPPS/tests-on-diff/.tox/py3/lib/python3.7/site-packages/django/template/base.py", line 937, in render
E bit = node.render_annotated(context)
E File "/var/lib/jenkins/workspace/DWAPPS/tests-on-diff/.tox/py3/lib/python3.7/site-packages/django/template/base.py", line 904, in render_annotated
E return self.render(context)
E File "/var/lib/jenkins/workspace/DWAPPS/tests-on-diff/.tox/py3/lib/python3.7/site-packages/django/template/loader_tags.py", line 150, in render
E return compiled_parent._render(context)
E File "/var/lib/jenkins/workspace/DWAPPS/tests-on-diff/.tox/py3/lib/python3.7/site-packages/django/test/utils.py", line 96, in instrumented_test_render
E return self.nodelist.render(context)
E File "/var/lib/jenkins/workspace/DWAPPS/tests-on-diff/.tox/py3/lib/python3.7/site-packages/django/template/base.py", line 937, in render
E bit = node.render_annotated(context)
E File "/var/lib/jenkins/workspace/DWAPPS/tests-on-diff/.tox/py3/lib/python3.7/site-packages/django/template/base.py", line 904, in render_annotated
E return self.render(context)
E File "/var/lib/jenkins/workspace/DWAPPS/tests-on-diff/.tox/py3/lib/python3.7/site-packages/django/template/loader_tags.py", line 62, in render
E result = block.nodelist.render(context)
E File "/var/lib/jenkins/workspace/DWAPPS/tests-on-diff/.tox/py3/lib/python3.7/site-packages/django/template/base.py", line 937, in render
E bit = node.render_annotated(context)
E File "/var/lib/jenkins/workspace/DWAPPS/tests-on-diff/.tox/py3/lib/python3.7/site-packages/django/template/base.py", line 904, in render_annotated
E return self.render(context)
E File "/var/lib/jenkins/workspace/DWAPPS/tests-on-diff/.tox/py3/lib/python3.7/site-packages/django/template/loader_tags.py", line 62, in render
E result = block.nodelist.render(context)
E File "/var/lib/jenkins/workspace/DWAPPS/tests-on-diff/.tox/py3/lib/python3.7/site-packages/django/template/base.py", line 937, in render
E bit = node.render_annotated(context)
E File "/var/lib/jenkins/workspace/DWAPPS/tests-on-diff/.tox/py3/lib/python3.7/site-packages/django/template/base.py", line 904, in render_annotated
E return self.render(context)
E File "/var/lib/jenkins/workspace/DWAPPS/tests-on-diff/.tox/py3/lib/python3.7/site-packages/django/template/loader_tags.py", line 62, in render
E result = block.nodelist.render(context)
E File "/var/lib/jenkins/workspace/DWAPPS/tests-on-diff/.tox/py3/lib/python3.7/site-packages/django/template/base.py", line 937, in render
E bit = node.render_annotated(context)
E File "/var/lib/jenkins/workspace/DWAPPS/tests-on-diff/.tox/py3/lib/python3.7/site-packages/django/template/base.py", line 904, in render_annotated
E return self.render(context)
E File "/var/lib/jenkins/workspace/DWAPPS/tests-on-diff/.tox/py3/lib/python3.7/site-packages/django/template/loader_tags.py", line 188, in render
E return template.render(context)
E File "/var/lib/jenkins/workspace/DWAPPS/tests-on-diff/.tox/py3/lib/python3.7/site-packages/django/template/base.py", line 173, in render
E return self._render(context)
E File "/var/lib/jenkins/workspace/DWAPPS/tests-on-diff/.tox/py3/lib/python3.7/site-packages/django/test/utils.py", line 96, in instrumented_test_render
E return self.nodelist.render(context)
E File "/var/lib/jenkins/workspace/DWAPPS/tests-on-diff/.tox/py3/lib/python3.7/site-packages/django/template/base.py", line 937, in render
E bit = node.render_annotated(context)
E File "/var/lib/jenkins/workspace/DWAPPS/tests-on-diff/.tox/py3/lib/python3.7/site-packages/django/template/base.py", line 904, in render_annotated
E return self.render(context)
E File "/var/lib/jenkins/workspace/DWAPPS/tests-on-diff/.tox/py3/lib/python3.7/site-packages/django/template/loader_tags.py", line 188, in render
E return template.render(context)
E File "/var/lib/jenkins/workspace/DWAPPS/tests-on-diff/.tox/py3/lib/python3.7/site-packages/django/template/base.py", line 173, in render
E return self._render(context)
E File "/var/lib/jenkins/workspace/DWAPPS/tests-on-diff/.tox/py3/lib/python3.7/site-packages/django/test/utils.py", line 96, in instrumented_test_render
E return self.nodelist.render(context)
E File "/var/lib/jenkins/workspace/DWAPPS/tests-on-diff/.tox/py3/lib/python3.7/site-packages/django/template/base.py", line 937, in render
E bit = node.render_annotated(context)
E File "/var/lib/jenkins/workspace/DWAPPS/tests-on-diff/.tox/py3/lib/python3.7/site-packages/django/template/base.py", line 904, in render_annotated
E return self.render(context)
E File "/var/lib/jenkins/workspace/DWAPPS/tests-on-diff/.tox/py3/lib/python3.7/site-packages/django/template/defaulttags.py", line 309, in render
E return nodelist.render(context)
E File "/var/lib/jenkins/workspace/DWAPPS/tests-on-diff/.tox/py3/lib/python3.7/site-packages/django/template/base.py", line 937, in render
E bit = node.render_annotated(context)
E File "/var/lib/jenkins/workspace/DWAPPS/tests-on-diff/.tox/py3/lib/python3.7/site-packages/django/template/base.py", line 904, in render_annotated
E return self.render(context)
E File "/var/lib/jenkins/workspace/DWAPPS/tests-on-diff/.tox/py3/lib/python3.7/site-packages/django/template/defaulttags.py", line 209, in render
E nodelist.append(node.render_annotated(context))
E File "/var/lib/jenkins/workspace/DWAPPS/tests-on-diff/.tox/py3/lib/python3.7/site-packages/django/template/base.py", line 904, in render_annotated
E return self.render(context)
E File "/var/lib/jenkins/workspace/DWAPPS/tests-on-diff/.tox/py3/lib/python3.7/site-packages/django/template/defaulttags.py", line 309, in render
E return nodelist.render(context)
E File "/var/lib/jenkins/workspace/DWAPPS/tests-on-diff/.tox/py3/lib/python3.7/site-packages/django/template/base.py", line 937, in render
E bit = node.render_annotated(context)
E File "/var/lib/jenkins/workspace/DWAPPS/tests-on-diff/.tox/py3/lib/python3.7/site-packages/django/template/base.py", line 904, in render_annotated
E return self.render(context)
E File "/var/lib/jenkins/workspace/DWAPPS/tests-on-diff/.tox/py3/lib/python3.7/site-packages/django/template/base.py", line 987, in render
E output = self.filter_expression.resolve(context)
E File "/var/lib/jenkins/workspace/DWAPPS/tests-on-diff/.tox/py3/lib/python3.7/site-packages/django/template/base.py", line 698, in resolve
E new_obj = func(obj, *arg_vals)
E File "/var/lib/jenkins/workspace/DWAPPS/tests-on-diff/.tox/py3/lib/python3.7/site-packages/swh/web/common/swh_templatetags.py", line 124, in key_value
E return dict[key]
E KeyError: <ObjectType.CONTENT: 'cnt'>
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 3 2021, 10:02 AM