Changeset View
Changeset View
Standalone View
Standalone View
swh/storage/tests/test_revision_bw_compat.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 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 attr | import attr | ||||
from swh.core.utils import decode_with_escape | from swh.core.utils import decode_with_escape | ||||
from swh.model.model import Revision | from swh.model.model import Revision | ||||
from swh.storage import get_storage | from swh.storage import get_storage | ||||
from swh.storage.tests.test_storage import db_transaction | from swh.storage.tests.test_postgresql import db_transaction | ||||
def headers_to_db(git_headers): | def headers_to_db(git_headers): | ||||
return [[key, decode_with_escape(value)] for key, value in git_headers] | return [[key, decode_with_escape(value)] for key, value in git_headers] | ||||
def test_revision_extra_header_in_metadata(swh_storage_backend_config, sample_data): | def test_revision_extra_header_in_metadata(swh_storage_backend_config, sample_data): | ||||
storage = get_storage(**swh_storage_backend_config) | storage = get_storage(**swh_storage_backend_config) | ||||
Show All 28 Lines |