client = <django.test.client.Client object at 0x7fbe668ae048>
archive_data = <swh.web.tests.conftest._ArchiveData object at 0x7fbe6beb4cc0>
@given(origin())
> def test_origin_root_directory_view(client, archive_data, origin):
.tox/py3/lib/python3.7/site-packages/swh/web/tests/browse/views/test_origin.py:161:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.tox/py3/lib/python3.7/site-packages/swh/web/tests/browse/views/test_origin.py:180: in test_origin_root_directory_view
dir_content,
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
client = <django.test.client.Client object at 0x7fbe668ae048>
archive_data = <swh.web.tests.conftest._ArchiveData object at 0x7fbe6beb4cc0>
origin_info = {'archives': ['highlightjs-line-numbers.js.zip', 'highlightjs-line-numbers.js_visit2.zip'], 'type': 'git', 'url': 'https://github.com/wcoder/highlightjs-line-numbers.js'}
origin_visit = {'date': '2020-08-07T12:28:19.403143+00:00', 'metadata': {}, 'origin': 'https://github.com/wcoder/highlightjs-line-numbers.js', 'snapshot': 'da8abf3ec5203afa1561754a041aca64d7580ec2', ...}
origin_branches = [{'date': '18 December 2018, 19:31 UTC', 'directory': '5b61d50ef35ca9a4618a3572bde947b8cccf71ad', 'message': 'Merge pu...ca09d659cc07ad2eb4a119ab6ec49efd0c113e35', 'message': 'Fixed url\n', 'name': 'refs/remotes/origin/gh-pages', ...}, ...]
origin_releases = [{'branch_name': 'refs/tags/v2.0.0', 'date': '31 May 2017, 22:54 UTC', 'directory': 'f56e2d15416d5f2756310daae3fda26d6... UTC', 'directory': '5b61d50ef35ca9a4618a3572bde947b8cccf71ad', 'id': '6877028d6e5412780517d0bfa81f07f6c51abb41', ...}]
root_directory_sha1 = '5b61d50ef35ca9a4618a3572bde947b8cccf71ad'
directory_entries = [{'checksums': {'sha1': 'ebcbc7adecd155134926907d6fc6138914195320', 'sha1_git': '34b11d1e5bb154d959754520802f3d59f8e41...87ded0b610be2e'}, 'dir_id': '5b61d50ef35ca9a4618a3572bde947b8cccf71ad', 'length': 2361, 'name': 'README.md', ...}, ...]
visit_id = 2, timestamp = None, snapshot_id = None, path = None
def _origin_directory_view_test_helper(
client,
archive_data,
origin_info,
origin_visit,
origin_branches,
origin_releases,
root_directory_sha1,
directory_entries,
visit_id=None,
timestamp=None,
snapshot_id=None,
path=None,
):
dirs = [e for e in directory_entries if e["type"] in ("dir", "rev")]
files = [e for e in directory_entries if e["type"] == "file"]
if not visit_id and not snapshot_id:
visit_id = origin_visit["visit"]
query_params = {"origin_url": origin_info["url"]}
if timestamp:
query_params["timestamp"] = timestamp
elif visit_id:
query_params["visit_id"] = visit_id
else:
query_params["snapshot"] = snapshot_id
if path:
query_params["path"] = path
url = reverse("browse-origin-directory", query_params=query_params)
resp = client.get(url)
> assert resp.status_code == 200
E assert 500 == 200
E +500
E -200
.tox/py3/lib/python3.7/site-packages/swh/web/tests/browse/views/test_origin.py:992: AssertionError
TEST RESULT
TEST RESULT
- Run At
- Aug 7 2020, 2:30 PM