Skip to content
Snippets Groups Projects
Verified Commit 2a960364 authored by Daniel Hornung's avatar Daniel Hornung
Browse files

TEST: Failing test for issue 100

For #100 models.py::_parse_value fails for some list-valued content
parent 2537f1b0
No related branches found
No related tags found
1 merge request!46TEST: Better exception message if server sends wrong XML.
Pipeline #19937 failed
<Record id="1002" description="A description of this example experiment.">
<Version id="945c6858819d2609a5475ee4df64571984acd039" head="true">
<Predecessor id="0df3cfe164fbafe9777f9356d0be2403890c54cd" />
</Version>
<Parent id="1001" name="Experiment" />
<Property datatype="SomeRecordType" id="1003" name="DepthTest" importance="FIX">
<Value>1004</Value>
<Value>1005</Value>
</Property>
</Record>
# This file is a part of the CaosDB Project.
#
# Copyright (c) 2022 IndiScale GmbH
# Copyright (c) 2022 Daniel Hornung (d.hornung@indiscale.com)
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
"""Test known issues to prevent regressions.
"""
import os
import lxml
import caosdb as db
def test_issue_100():
"""_parse_value() fails for some list-valued content
"""
filename = os.path.join(os.path.dirname(__file__), "data", "list_in_value.xml")
xml_el = lxml.etree.parse(filename).getroot()
rec = db.common.models._parse_single_xml_element(xml_el)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment