Changeset View
Changeset View
Standalone View
Standalone View
swh/web/tests/api/views/test_graph.py
# Copyright (C) 2020 The Software Heritage developers | # Copyright (C) 2020 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 hashlib | import hashlib | ||||
import json | import json | ||||
import textwrap | import textwrap | ||||
from hypothesis import given | from hypothesis import given | ||||
from django.http.response import StreamingHttpResponse | from django.http.response import StreamingHttpResponse | ||||
from swh.model.hashutil import hash_to_bytes | from swh.model.hashutil import hash_to_bytes | ||||
from swh.model.identifiers import ExtendedObjectType, ExtendedSWHID | from swh.model.swhids import ExtendedObjectType, ExtendedSWHID | ||||
from swh.web.api.views.graph import API_GRAPH_PERM | from swh.web.api.views.graph import API_GRAPH_PERM | ||||
from swh.web.common.utils import reverse | from swh.web.common.utils import reverse | ||||
from swh.web.config import SWH_WEB_INTERNAL_SERVER_NAME, get_config | from swh.web.config import SWH_WEB_INTERNAL_SERVER_NAME, get_config | ||||
from swh.web.tests.strategies import origin | from swh.web.tests.strategies import origin | ||||
from swh.web.tests.utils import check_http_get_response | from swh.web.tests.utils import check_http_get_response | ||||
def test_graph_endpoint_no_authentication_for_vpn_users(api_client, requests_mock): | def test_graph_endpoint_no_authentication_for_vpn_users(api_client, requests_mock): | ||||
▲ Show 20 Lines • Show All 238 Lines • Show Last 20 Lines |