Changeset View
Changeset View
Standalone View
Standalone View
swh/web/tests/browse/views/test_revision.py
# Copyright (C) 2017-2020 The Software Heritage developers | # Copyright (C) 2017-2021 The Software Heritage developers | ||||
# See the AUTHORS file at the top-level directory of this distribution | # See the AUTHORS file at the top-level directory of this distribution | ||||
# License: GNU Affero General Public License version 3, or any later version | # License: GNU Affero General Public License version 3, or any later version | ||||
# See top-level LICENSE file for more information | # See top-level LICENSE file for more information | ||||
import json | import json | ||||
import random | import random | ||||
from hypothesis import given | from hypothesis import given | ||||
Show All 19 Lines | |||||
@given(revision()) | @given(revision()) | ||||
def test_revision_browse(client, archive_data, revision): | def test_revision_browse(client, archive_data, revision): | ||||
_revision_browse_checks(client, archive_data, revision) | _revision_browse_checks(client, archive_data, revision) | ||||
@given(origin()) | @given(origin()) | ||||
def test_revision_origin_snapshot_browse(client, archive_data, origin): | def test_revision_origin_snapshot_browse(client, archive_data, swh_scheduler, origin): | ||||
snapshot = archive_data.snapshot_get_latest(origin["url"]) | snapshot = archive_data.snapshot_get_latest(origin["url"]) | ||||
revision = archive_data.snapshot_get_head(snapshot) | revision = archive_data.snapshot_get_head(snapshot) | ||||
_revision_browse_checks(client, archive_data, revision, origin_url=origin["url"]) | _revision_browse_checks(client, archive_data, revision, origin_url=origin["url"]) | ||||
_revision_browse_checks(client, archive_data, revision, snapshot=snapshot) | _revision_browse_checks(client, archive_data, revision, snapshot=snapshot) | ||||
_revision_browse_checks( | _revision_browse_checks( | ||||
client, archive_data, revision, origin_url=origin["url"], snapshot=snapshot, | client, archive_data, revision, origin_url=origin["url"], snapshot=snapshot, | ||||
) | ) | ||||
▲ Show 20 Lines • Show All 303 Lines • Show Last 20 Lines |