Changeset View
Changeset View
Standalone View
Standalone View
swh/web/api/tests/views/test_content.py
- This file was moved from swh/web/tests/api/views/test_content.py.
# Copyright (C) 2015-2022 The Software Heritage developers | # Copyright (C) 2015-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 pytest | import pytest | ||||
from swh.web.tests.conftest import fossology_missing | |||||
from swh.web.tests.data import random_content | from swh.web.tests.data import random_content | ||||
from swh.web.tests.helpers import ( | from swh.web.tests.helpers import ( | ||||
check_api_get_responses, | check_api_get_responses, | ||||
check_api_post_responses, | check_api_post_responses, | ||||
check_http_get_response, | check_http_get_response, | ||||
fossology_missing, | |||||
) | ) | ||||
from swh.web.utils import reverse | from swh.web.utils import reverse | ||||
def test_api_content_filetype(api_client, indexer_data, content): | def test_api_content_filetype(api_client, indexer_data, content): | ||||
indexer_data.content_add_mimetype(content["sha1"]) | indexer_data.content_add_mimetype(content["sha1"]) | ||||
url = reverse( | url = reverse( | ||||
"api-1-content-filetype", url_args={"q": "sha1_git:%s" % content["sha1_git"]} | "api-1-content-filetype", url_args={"q": "sha1_git:%s" % content["sha1_git"]} | ||||
▲ Show 20 Lines • Show All 230 Lines • Show Last 20 Lines |