Changeset View
Changeset View
Standalone View
Standalone View
swh/web/tests/api/test_apiresponse.py
# Copyright (C) 2015-2021 The Software Heritage developers | # Copyright (C) 2015-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 | ||||
from corsheaders.middleware import ( | from corsheaders.middleware import ( | ||||
ACCESS_CONTROL_ALLOW_HEADERS, | ACCESS_CONTROL_ALLOW_HEADERS, | ||||
ACCESS_CONTROL_ALLOW_METHODS, | ACCESS_CONTROL_ALLOW_METHODS, | ||||
ACCESS_CONTROL_ALLOW_ORIGIN, | ACCESS_CONTROL_ALLOW_ORIGIN, | ||||
) | ) | ||||
from hypothesis import given | from hypothesis import given | ||||
from swh.model.identifiers import ObjectType | from swh.model.swhids import ObjectType | ||||
from swh.web.api.apiresponse import ( | from swh.web.api.apiresponse import ( | ||||
compute_link_header, | compute_link_header, | ||||
filter_by_fields, | filter_by_fields, | ||||
make_api_response, | make_api_response, | ||||
transform, | transform, | ||||
) | ) | ||||
from swh.web.common.identifiers import gen_swhid | from swh.web.common.identifiers import gen_swhid | ||||
from swh.web.common.utils import reverse | from swh.web.common.utils import reverse | ||||
▲ Show 20 Lines • Show All 167 Lines • Show Last 20 Lines |