Changeset View
Changeset View
Standalone View
Standalone View
swh/web/tests/browse/views/test_origin.py
Show First 20 Lines • Show All 815 Lines • ▼ Show 20 Lines | ): | ||||
resp = check_html_get_response( | resp = check_html_get_response( | ||||
client, url, status_code=200, template_used="browse/directory.html" | client, url, status_code=200, template_used="browse/directory.html" | ||||
) | ) | ||||
assert_contains( | assert_contains( | ||||
resp, f"Revision {unknown_revision } could not be found in the archive." | resp, f"Revision {unknown_revision } could not be found in the archive." | ||||
) | ) | ||||
# no revision card | |||||
assert_not_contains(resp, "swh-tip-revision") | |||||
# no Download dropdown | |||||
assert_not_contains(resp, "swh-vault-download") | |||||
# no History link | |||||
assert_not_contains(resp, "swh-tr-link") | |||||
# no SWHIDs for directory and revision | |||||
assert_not_contains(resp, "swh:1:dir:") | |||||
assert_not_contains(resp, "swh:1:rev:") | |||||
@given(origin()) | @given(origin()) | ||||
def test_origin_content_no_path(client, origin): | def test_origin_content_no_path(client, origin): | ||||
url = reverse("browse-origin-content", query_params={"origin_url": origin["url"]}) | url = reverse("browse-origin-content", query_params={"origin_url": origin["url"]}) | ||||
resp = check_html_get_response( | resp = check_html_get_response( | ||||
client, url, status_code=400, template_used="error.html" | client, url, status_code=400, template_used="error.html" | ||||
) | ) | ||||
▲ Show 20 Lines • Show All 487 Lines • Show Last 20 Lines |