Changeset View
Changeset View
Standalone View
Standalone View
swh/web/tests/api/views/test_identifiers.py
Show First 20 Lines • Show All 46 Lines • ▼ Show 20 Lines | ): | ||||
elif obj_type == SNAPSHOT: | elif obj_type == SNAPSHOT: | ||||
url_args = {"snapshot_id": obj_id} | url_args = {"snapshot_id": obj_id} | ||||
else: | else: | ||||
url_args = {"sha1_git": obj_id} | url_args = {"sha1_git": obj_id} | ||||
browse_rev_url = reverse( | browse_rev_url = reverse( | ||||
"browse-%s" % obj_type, | "browse-%s" % obj_type, | ||||
url_args=url_args, | url_args=url_args, | ||||
query_params={"origin": origin["url"]}, | query_params={"origin_url": origin["url"]}, | ||||
request=resp.wsgi_request, | request=resp.wsgi_request, | ||||
) | ) | ||||
expected_result = { | expected_result = { | ||||
"browse_url": browse_rev_url, | "browse_url": browse_rev_url, | ||||
"metadata": {"origin": origin["url"]}, | "metadata": {"origin": origin["url"]}, | ||||
"namespace": "swh", | "namespace": "swh", | ||||
"object_id": obj_id, | "object_id": obj_id, | ||||
▲ Show 20 Lines • Show All 125 Lines • Show Last 20 Lines |