client = <django.test.client.Client object at 0x7f8f42d28080>
archive_data = <swh.web.tests.conftest._ArchiveData object at 0x7f8f42d28c88>
origin = {'archives': ['highlightjs-line-numbers.js.zip', 'highlightjs-line-numbers.js_visit2.zip'], 'id': b'MZ\xc0H_lE[d\xcc\x...s://doi.org/10.5063/schema/codemeta-2.0', 'description': 'Line numbering plugin for Highlight.js'}, 'type': 'git', ...}
def test_snapshot_browse_branches(client, archive_data, origin):
snapshot = archive_data.snapshot_get_latest(origin["url"])
snapshot_sizes = archive_data.snapshot_count_branches(snapshot["id"])
snapshot_content = process_snapshot_branches(snapshot)
_origin_branches_test_helper(
> client, origin, snapshot_content, snapshot_sizes, snapshot_id=snapshot["id"]
)
.tox/py3/lib/python3.7/site-packages/swh/web/tests/browse/views/test_snapshot.py:97:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.tox/py3/lib/python3.7/site-packages/swh/web/tests/browse/views/test_snapshot.py:127: in _origin_branches_test_helper
assert_contains(resp, f'href="{escape(origin_releases_url)}">')
.tox/py3/lib/python3.7/site-packages/django/test/testcases.py:454: in assertContains
self.assertTrue(real_count != 0, msg_prefix + "Couldn't find %s in response" % text_repr)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <django.test.testcases.TestCase testMethod=run>, expr = False
msg = 'False is not true : Couldn\'t find \'href="/browse/origin/releases/?origin_url=https://github.com/wcoder/highlightjs-line-numbers.js">\' in response'
def assertTrue(self, expr, msg=None):
"""Check that the expression is true."""
if not expr:
msg = self._formatMessage(msg, "%s is not true" % safe_repr(expr))
> raise self.failureException(msg)
E AssertionError: False is not true : Couldn't find 'href="/browse/origin/releases/?origin_url=https://github.com/wcoder/highlightjs-line-numbers.js">' in response
/usr/lib/python3.7/unittest/case.py:692: AssertionError
TEST RESULT
TEST RESULT
- Run At
- Oct 22 2021, 4:33 PM