Changeset View
Changeset View
Standalone View
Standalone View
swh/loader/package/deposit/tests/test_deposit.py
# Copyright (C) 2019-2020 The Software Heritage developers | # Copyright (C) 2019-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 re | import re | ||||
import pytest | import pytest | ||||
from swh.model.hashutil import hash_to_bytes, hash_to_hex | from swh.model.hashutil import hash_to_bytes, hash_to_hex | ||||
from swh.loader.package.deposit.loader import DepositLoader | from swh.loader.package.deposit.loader import DepositLoader | ||||
from swh.loader.package.tests.common import ( | from swh.loader.package.tests.common import check_metadata_paths | ||||
from swh.loader.tests import ( | |||||
assert_last_visit_matches, | |||||
check_snapshot, | check_snapshot, | ||||
check_metadata_paths, | |||||
get_stats, | get_stats, | ||||
) | ) | ||||
from swh.loader.tests import assert_last_visit_matches | |||||
from swh.core.pytest_plugin import requests_mock_datadir_factory | from swh.core.pytest_plugin import requests_mock_datadir_factory | ||||
DEPOSIT_URL = "https://deposit.softwareheritage.org/1/private" | DEPOSIT_URL = "https://deposit.softwareheritage.org/1/private" | ||||
@pytest.fixture | @pytest.fixture | ||||
▲ Show 20 Lines • Show All 340 Lines • Show Last 20 Lines |