Changeset View
Changeset View
Standalone View
Standalone View
swh/deposit/tests/loader/test_client.py
# Copyright (C) 2017-2020 The Software Heritage developers | # Copyright (C) 2017-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 General Public License version 3, or any later version | # License: GNU 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 | ||||
import os | import os | ||||
from typing import Any, Callable, Optional | from typing import Any, Callable, Optional | ||||
from urllib.parse import urlparse | from urllib.parse import urlparse | ||||
import pytest | import pytest | ||||
from requests import Session | from requests import Session | ||||
from swh.deposit.client import PrivateApiDepositClient | from swh.deposit.client import PrivateApiDepositClient | ||||
from swh.deposit.config import DEPOSIT_STATUS_LOAD_FAILURE, DEPOSIT_STATUS_LOAD_SUCCESS | from swh.deposit.constants import ( | ||||
DEPOSIT_STATUS_LOAD_FAILURE, | |||||
DEPOSIT_STATUS_LOAD_SUCCESS, | |||||
) | |||||
CLIENT_TEST_CONFIG = { | CLIENT_TEST_CONFIG = { | ||||
"url": "https://nowhere.org/", | "url": "https://nowhere.org/", | ||||
"auth": {}, # no authentication in test scenario | "auth": {}, # no authentication in test scenario | ||||
} | } | ||||
@pytest.fixture | @pytest.fixture | ||||
▲ Show 20 Lines • Show All 223 Lines • Show Last 20 Lines |