Changeset View
Changeset View
Standalone View
Standalone View
swh/deposit/tests/test_utils.py
# Copyright (C) 2018-2020 The Software Heritage developers | # Copyright (C) 2018-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 pytest | import pytest | ||||
from swh.deposit import utils | from swh.deposit import utils | ||||
from swh.deposit.parsers import parse_xml | from swh.deposit.parsers import parse_xml | ||||
from swh.model.exceptions import ValidationError | from swh.model.exceptions import ValidationError | ||||
from swh.model.identifiers import CoreSWHID, QualifiedSWHID | from swh.model.swhids import CoreSWHID, QualifiedSWHID | ||||
@pytest.fixture | @pytest.fixture | ||||
def xml_with_origin_reference(): | def xml_with_origin_reference(): | ||||
xml_data = """<?xml version="1.0"?> | xml_data = """<?xml version="1.0"?> | ||||
<entry xmlns="http://www.w3.org/2005/Atom" | <entry xmlns="http://www.w3.org/2005/Atom" | ||||
xmlns:codemeta="https://doi.org/10.5063/SCHEMA/CODEMETA-2.0" | xmlns:codemeta="https://doi.org/10.5063/SCHEMA/CODEMETA-2.0" | ||||
xmlns:swh="https://www.softwareheritage.org/schema/2018/deposit"> | xmlns:swh="https://www.softwareheritage.org/schema/2018/deposit"> | ||||
▲ Show 20 Lines • Show All 257 Lines • Show Last 20 Lines |