Changeset View
Changeset View
Standalone View
Standalone View
swh/web/api/tests/views/test_metadata.py
- This file was moved from swh/web/tests/api/views/test_metadata.py.
# Copyright (C) 2022 The Software Heritage developers | # Copyright (C) 2022 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 attr | import attr | ||||
from hypothesis import given, settings | from hypothesis import given, settings | ||||
from hypothesis.strategies import sets | from hypothesis.strategies import sets | ||||
import pytest | import pytest | ||||
from swh.model.hypothesis_strategies import raw_extrinsic_metadata | from swh.model.hypothesis_strategies import raw_extrinsic_metadata | ||||
from swh.model.model import Origin | from swh.model.model import Origin | ||||
from swh.web.tests.api.views.utils import scroll_results | from swh.web.api.tests.views.utils import scroll_results | ||||
from swh.web.tests.helpers import check_api_get_responses, check_http_get_response | from swh.web.tests.helpers import check_api_get_responses, check_http_get_response | ||||
from swh.web.utils import reverse | from swh.web.utils import reverse | ||||
@given(raw_extrinsic_metadata()) | @given(raw_extrinsic_metadata()) | ||||
def test_api_raw_extrinsic_metadata(api_client, subtest, metadata): | def test_api_raw_extrinsic_metadata(api_client, subtest, metadata): | ||||
# ensure archive_data fixture will be reset between each hypothesis | # ensure archive_data fixture will be reset between each hypothesis | ||||
# example test run | # example test run | ||||
▲ Show 20 Lines • Show All 234 Lines • Show Last 20 Lines |