Changeset View
Changeset View
Standalone View
Standalone View
swh/web/tests/api/views/test_metadata.py
# Copyright (C) 2021 The Software Heritage developers | # Copyright (C) 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 attr | import attr | ||||
from hypothesis import given | from hypothesis import given | ||||
from hypothesis.strategies import composite, sampled_from, sets | from hypothesis.strategies import composite, sampled_from, sets | ||||
import pytest | import pytest | ||||
from swh.model.hypothesis_strategies import ( | from swh.model.hypothesis_strategies import ( | ||||
raw_extrinsic_metadata as raw_extrinsic_metadata_orig, | raw_extrinsic_metadata as raw_extrinsic_metadata_orig, | ||||
) | ) | ||||
from swh.model.hypothesis_strategies import sha1_git | from swh.model.hypothesis_strategies import sha1_git | ||||
from swh.model.identifiers import ExtendedObjectType, ExtendedSWHID, ObjectType | from swh.model.swhids import ExtendedObjectType, ExtendedSWHID, ObjectType | ||||
from swh.web.common.utils import reverse | from swh.web.common.utils import reverse | ||||
from swh.web.tests.api.views.utils import scroll_results | from swh.web.tests.api.views.utils import scroll_results | ||||
from swh.web.tests.utils import check_api_get_responses, check_http_get_response | from swh.web.tests.utils import check_api_get_responses, check_http_get_response | ||||
# public Web API endpoint for raw extrinsic metadata does not support | # public Web API endpoint for raw extrinsic metadata does not support | ||||
# extended SWHIDs so we ensure only core ones will be used in test inputs. | # extended SWHIDs so we ensure only core ones will be used in test inputs. | ||||
@composite | @composite | ||||
▲ Show 20 Lines • Show All 185 Lines • Show Last 20 Lines |